function taxonomy_manager_move_form in Taxonomy Manager 6
Same name and namespace in other branches
- 5 taxonomy_manager.module \taxonomy_manager_move_form()
- 6.2 taxonomy_manager.admin.inc \taxonomy_manager_move_form()
- 7 taxonomy_manager.admin.inc \taxonomy_manager_move_form()
form for moving terms in hierarchies
1 call to taxonomy_manager_move_form()
- taxonomy_manager_form in ./
taxonomy_manager.admin.inc - defines forms for taxonomy manager interface
File
- ./
taxonomy_manager.admin.inc, line 432
Code
function taxonomy_manager_move_form($voc) {
drupal_add_js(array(
'hideForm' => array(
'show_button' => 'edit-move-show',
'hide_button' => 'edit-move-cancel',
'div' => 'move-form',
),
), 'setting');
$form = array();
$description = t("You can change the parent of one or more selected terms. \n If you leave the autocomplete field empty, the term will be a root term.");
$form['move'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#attributes' => array(
'id' => 'move-form',
),
'#title' => t('Moving of terms'),
'#description' => $description,
);
if ($voc->hierarchy == 2) {
$auto_description .= t("Separate parent terms with a comma. ");
}
$form['move']['parents'] = array(
'#type' => 'textfield',
'#title' => t('Parent term(s)'),
'#description' => $auto_description,
'#required' => FALSE,
'#autocomplete_path' => 'taxonomy_manager/autocomplete/' . $voc->vid,
);
$options = array();
$options['keep_old_parents'] = t('Keep old parents and add new ones (multi-parent). Otherwise old parents get replaced.');
$form['move']['options'] = array(
'#type' => 'checkboxes',
'#title' => t('Options'),
'#options' => $options,
);
$form['move']['submit'] = array(
'#type' => 'submit',
'#attributes' => array(
'class' => 'taxonomy-manager-buttons move',
),
'#value' => t('Move'),
'#validate' => array(
'taxonomy_manager_form_move_validate',
),
'#submit' => array(
'taxonomy_manager_form_move_submit',
),
);
$form['move']['cancel'] = array(
'#type' => 'button',
'#value' => t('Cancel'),
'#attributes' => array(
'class' => 'taxonomy-manager-buttons cancel',
),
'#theme' => 'no_submit_button',
);
return $form;
}