You are here

function sharerich_form_node_type_form_alter in Sharerich 7

Same name and namespace in other branches
  1. 7.3 sharerich.module \sharerich_form_node_type_form_alter()
  2. 7.2 sharerich.module \sharerich_form_node_type_form_alter()

Implements hook_form_FORM_ID_alter().

File

./sharerich.module, line 221

Code

function sharerich_form_node_type_form_alter(&$form, &$form_state) {
  $form['sharerich'] = array(
    '#type' => 'fieldset',
    '#title' => t('Sharerich'),
    '#collapsible' => TRUE,
    '#group' => 'additional_settings',
    '#weight' => 20,
    '#attributes' => array(
      'class' => array(
        'sharerich-node-type-settings-form',
      ),
    ),
    '#access' => user_access('administer nodes'),
  );
  $entity_type = $form['#node_type']->type;
  $form['sharerich']['show'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Sharerich for this content type.'),
    '#default_value' => variable_get('sharerich_node_' . $entity_type, FALSE),
    '#suffix' => t('After enabling Sharerich you need to configure each display on Manage display tag.<br/>Please visit the <a href="/admin/config/user-interface/sharerich">configuration page</a> to customize the share buttons.'),
  );
  $form['#submit'][] = 'sharerich_node_type_callback';
}