function taxonomy_manager_double_tree_settings_form in Taxonomy Manager 6.2
Same name and namespace in other branches
- 7 taxonomy_manager.admin.inc \taxonomy_manager_double_tree_settings_form()
1 call to taxonomy_manager_double_tree_settings_form()
- taxonomy_manager_form in ./
taxonomy_manager.admin.inc - defines forms for taxonomy manager interface
File
- ./
taxonomy_manager.admin.inc, line 732 - Taxonomy Manager Admin
Code
function taxonomy_manager_double_tree_settings_form($voc) {
drupal_add_js(array(
'hideForm' => array(
'show_button' => 'edit-double-tree-show',
'hide_button' => 'edit-double-tree-cancel',
'div' => 'double-tree-settings-form',
),
), 'setting');
$form = array();
$form['double_tree'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#attributes' => array(
'id' => 'double-tree-settings-form',
'style' => 'display:none;',
),
'#title' => t('Double Tree Settings'),
'#description' => t('Specify settings for second tree. Choose the same vocabulary if you want to move terms in the hierarchy or if you want to add new translations within a multilingual vocabulary. Choose a different vocabulary if you want to switch terms among these vocabularies.'),
);
$options = array();
$vocs = taxonomy_get_vocabularies();
foreach ($vocs as $v) {
$options[$v->vid] = $v->name;
}
$form['double_tree']['voc2'] = array(
'#type' => 'select',
'#title' => t('Vocabulary for second tree'),
'#options' => $options,
'#default_value' => $voc->vid,
);
$form['double_tree']['submit'] = array(
'#type' => 'submit',
'#attributes' => array(
'class' => 'taxonomy-manager-buttons double-tree',
),
'#value' => t('Enable Double Tree'),
'#submit' => array(
'taxonomy_manager_form_double_tree_submit',
),
);
if (arg(3) == "double-tree") {
$form['double_tree']['disable'] = array(
'#type' => 'submit',
'#attributes' => array(
'class' => 'taxonomy-manager-buttons double-tree-disable',
),
'#value' => t('Disable Double Tree'),
'#submit' => array(
'taxonomy_manager_form_double_tree_disable_submit',
),
);
}
$form['double_tree']['cancel'] = array(
'#type' => 'button',
'#value' => t('Cancel'),
'#attributes' => array(
'class' => 'taxonomy-manager-buttons cancel',
),
'#theme' => 'no_submit_button',
);
return $form;
}