You are here

function tvi_form_alter in Taxonomy Views Integrator 6

Same name and namespace in other branches
  1. 7 tvi.module \tvi_form_alter()

Implements hook_form_alter().

Used to add some items to the taxonomy term and vocab edit pages

See also

http://api.drupal.org/api/function/hook_form_alter/6

File

./tvi.module, line 93
Enables use of views for taxonomy pages.

Code

function tvi_form_alter(&$form, $form_state, $form_id) {
  if (user_access('administer taxonomy view integrator')) {
    if ($form_id == 'taxonomy_form_term' && !isset($form_state['confirm_delete']) && !isset($form_state['confirm_parents'])) {
      tvi_include('admin');
      tvi_term_form($form);
    }
    elseif ($form_id == 'taxonomy_form_vocabulary') {
      tvi_include('admin');
      tvi_vocab_form($form);
    }
  }
}