function taxonomy_manager_move_form in Taxonomy Manager 7
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()
- 6 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 648
Code
function taxonomy_manager_move_form(&$form, $voc) {
$form['#attached']['js'][] = array(
'data' => array(
'hideForm' => array(
array(
'show_button' => 'edit-move-show',
'hide_button' => 'edit-move-cancel',
'div' => 'edit-move',
),
),
),
'type' => 'setting',
);
$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['toolbar']['move_show'] = array(
//'#type' => 'button',
'#value' => t('Move'),
'#attributes' => array(
'class' => array(
'taxonomy-manager-buttons move',
),
),
'#theme' => 'no_submit_button',
);
$form['move'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#attributes' => array(
'style' => 'display:none;',
'id' => 'edit-move',
),
'#title' => t('Moving of terms'),
'#description' => $description,
);
$form['move']['parents'] = array(
'#type' => 'textfield',
'#title' => t('Parent term(s)'),
'#description' => t("Enter a unique term name or a term id with 'term-id:[tid]'. Separate multiple parent terms with commas."),
'#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' => array(
'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' => array(
'taxonomy-manager-buttons',
'cancel',
),
),
'#theme' => 'no_submit_button',
);
}