You are here

function nodeorder_form_alter in Node Order 5

Same name and namespace in other branches
  1. 6 nodeorder.module \nodeorder_form_alter()

Implementation of hook_form_alter().

File

./nodeorder.module, line 15

Code

function nodeorder_form_alter($form_id, &$form) {
  if ($form_id == 'taxonomy_form_vocabulary') {
    $is_orderable = $form['module']['#value'] == 'nodeorder';
    $form['orderable'] = array(
      '#type' => 'checkbox',
      '#title' => t('Orderable'),
      '#description' => t('If enabled, nodes may be ordered within this vocabulary.'),
      '#weight' => 0.008500000000000001,
      // Try to have this show up after the 'Required' checkbox
      '#default_value' => $is_orderable,
    );
    $form['#submit']['nodeorder_taxonomy_form_vocabulary_submit'] = array();
  }
}