You are here

function edit_link_form_alter in Util 6.3

Same name and namespace in other branches
  1. 7 contribs/edit_link/edit_link.module \edit_link_form_alter()

Implements hook_settings().

File

contribs/edit_link/edit_link.module, line 34
Add an 'edit' link to nodes.

Code

function edit_link_form_alter(&$form, $form_state, $form_id) {
  $noyes = array(
    t('No'),
    t('Yes'),
  );
  switch ($form_id) {
    case 'util_page':
      $form['edit'] = array(
        '#type' => 'fieldset',
        '#title' => t('Edit Link Options'),
        '#collapsible' => TRUE,
        '#group' => 'node',
      );
      $form['edit']['edit_link_type'] = array(
        '#title' => t('Show content type?'),
        '#type' => 'radios',
        '#options' => $noyes,
        '#default_value' => variable_get('edit_link_type', 0),
        '#description' => t("If this option is chosen, a post's content type will be shown in the edit link."),
        '#attributes' => array(
          'class' => 'container-inline',
        ),
        '#prefix' => '<div id="edit-type">',
        '#suffix' => '</div>',
      );
  }
}