function taxonomy_manager_double_tree_settings_form in Taxonomy Manager 7
Same name and namespace in other branches
- 6.2 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 813
Code
function taxonomy_manager_double_tree_settings_form(&$form, $voc) {
$form['#attached']['js'][] = array(
'data' => array(
'hideForm' => array(
array(
'show_button' => 'edit-double-tree-show',
'hide_button' => 'edit-double-tree-settings-cancel',
'div' => 'edit-double-tree-settings',
),
),
),
'type' => 'setting',
);
$form['toolbar']['double_tree_show'] = array(
//'#type' => 'button',
'#attributes' => array(
'class' => array(
'taxonomy-manager-buttons double-tree',
),
),
'#value' => t('Double Tree'),
'#theme' => 'no_submit_button',
);
$form['double-tree-settings'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#attributes' => array(
'style' => 'display:none;',
'id' => 'edit-double-tree-settings',
),
'#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->machine_name] = $v->name;
}
$form['double-tree-settings']['voc2_machine_name'] = array(
'#type' => 'select',
'#title' => t('Vocabulary for second tree'),
'#options' => $options,
'#default_value' => $voc->vid,
);
$form['double-tree-settings']['submit'] = array(
'#type' => 'submit',
'#attributes' => array(
'class' => array(
'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-settings']['disable'] = array(
'#type' => 'submit',
'#attributes' => array(
'class' => array(
'taxonomy-manager-buttons',
'double-tree-disable',
),
),
'#value' => t('Disable Double Tree'),
'#submit' => array(
'taxonomy_manager_form_double_tree_disable_submit',
),
);
}
$form['double-tree-settings']['cancel'] = array(
//'#type' => 'button',
'#value' => t('Cancel'),
'#attributes' => array(
'class' => array(
'taxonomy-manager-buttons',
'cancel',
),
),
'#theme' => 'no_submit_button',
);
}