function taxonomy_manager_confirm_delete in Taxonomy Manager 5
Same name and namespace in other branches
- 6.2 taxonomy_manager.admin.inc \taxonomy_manager_confirm_delete()
- 6 taxonomy_manager.admin.inc \taxonomy_manager_confirm_delete()
- 7 taxonomy_manager.admin.inc \taxonomy_manager_confirm_delete()
confirmation form for deleting selected terms
1 call to taxonomy_manager_confirm_delete()
- taxonomy_manager_form in ./
taxonomy_manager.module - defines forms for taxonomy manager interface
File
- ./
taxonomy_manager.module, line 335 - Taxonomy Manager
Code
function taxonomy_manager_confirm_delete($voc) {
drupal_add_js(array(
'hideForm' => array(
'show_button' => 'edit-delete-confirm',
'hide_button' => 'edit-delete-cancel',
'div' => 'del-confirm-form',
),
), 'setting');
$form = array();
$form['delete'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
'#title' => t('Confirmation'),
'#prefix' => '<div id="del-confirm-form">',
'#suffix' => '</div>',
);
$question = t('Are you sure you want to delete all selected terms? ');
$info = t('Remember all term specific data will be lost. This action cannot be undone.');
$form['delete']['text'] = array(
'#value' => "<b>" . $question . "</b><br/>" . $info,
);
if ($voc->hierarchy != 0) {
$options = array(
'delete_orphans' => t('Delete children of selected terms, if there are any'),
);
$form['delete']['options'] = array(
'#type' => 'checkboxes',
'#title' => t('Options'),
'#options' => $options,
);
}
$form['delete']['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#attributes' => array(
'class' => 'taxonomy-manager-buttons delete',
),
);
$form['delete']['cancel'] = array(
'#type' => 'button',
'#attributes' => array(
'class' => 'taxonomy-manager-buttons cancel',
),
'#value' => t('Cancel'),
'#theme' => 'no_submit_button',
);
return $form;
}