summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.admin.inc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc34
1 files changed, 3 insertions, 31 deletions
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index d83f5d367..a236cfed1 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -209,7 +209,7 @@ function taxonomy_form_vocabulary_validate($form, &$form_state) {
* @see taxonomy_form_vocabulary_validate()
*/
function taxonomy_form_vocabulary_submit($form, &$form_state) {
- if ($form_state['clicked_button']['#value'] == t('Delete')) {
+ if ($form_state['triggering_element']['#value'] == t('Delete')) {
// Rebuild the form to confirm vocabulary deletion.
$form_state['rebuild'] = TRUE;
$form_state['confirm_delete'] = TRUE;
@@ -434,7 +434,7 @@ function taxonomy_overview_terms($form, &$form_state, $vocabulary) {
* @see taxonomy_overview_terms()
*/
function taxonomy_overview_terms_submit($form, &$form_state) {
- if ($form_state['clicked_button']['#value'] == t('Reset to alphabetical')) {
+ if ($form_state['triggering_element']['#value'] == t('Reset to alphabetical')) {
// Execute the reset action.
if ($form_state['values']['reset_alphabetical'] === TRUE) {
return taxonomy_vocabulary_confirm_reset_alphabetical_submit($form, $form_state);
@@ -674,9 +674,6 @@ function taxonomy_form_term($form, &$form_state, $edit = array(), $vocabulary =
if (isset($form_state['confirm_delete'])) {
return array_merge($form, taxonomy_term_confirm_delete($form, $form_state, $term->tid));
}
- elseif (isset($form_state['confirm_parents'])) {
- return array_merge($form, taxonomy_term_confirm_parents($form, $form_state, $vocabulary));
- }
$form['name'] = array(
'#type' => 'textfield',
@@ -801,7 +798,7 @@ function taxonomy_form_term_validate($form, &$form_state) {
* @see taxonomy_form_term()
*/
function taxonomy_form_term_submit($form, &$form_state) {
- if ($form_state['clicked_button']['#value'] == t('Delete')) {
+ if ($form_state['triggering_element']['#value'] == t('Delete')) {
// Execute the term deletion.
if ($form_state['values']['delete'] === TRUE) {
return taxonomy_term_confirm_delete_submit($form, $form_state);
@@ -811,12 +808,6 @@ function taxonomy_form_term_submit($form, &$form_state) {
$form_state['confirm_delete'] = TRUE;
return;
}
- // Rebuild the form to confirm enabling multiple parents.
- elseif ($form_state['clicked_button']['#value'] == t('Save') && count($form_state['values']['parent']) > 1 && $form['#vocabulary']->hierarchy < 2) {
- $form_state['rebuild'] = TRUE;
- $form_state['confirm_parents'] = TRUE;
- return;
- }
$term = taxonomy_form_term_submit_build_taxonomy_term($form, $form_state);
@@ -873,25 +864,6 @@ function taxonomy_form_term_submit_build_taxonomy_term($form, &$form_state) {
}
/**
- * Form builder for the confirmation of multiple term parents.
- *
- * @ingroup forms
- * @see taxonomy_form_term()
- */
-function taxonomy_term_confirm_parents($form, &$form_state, $vocabulary) {
- foreach (element_children($form_state['values']) as $key) {
- $form[$key] = array(
- '#type' => 'value',
- '#value' => $form_state['values'][$key],
- );
- }
- $question = t('Set multiple term parents?');
- $description = '<p>' . t("Adding multiple parents to a term will cause the %vocabulary vocabulary to look for multiple parents on every term. Because multiple parents are not supported when using the drag and drop outline interface, drag and drop will be disabled if you enable this option. If you choose to have multiple parents, you will only be able to set parents by using the term edit form.", array('%vocabulary' => $vocabulary->name)) . '</p>';
- $description .= '<p>' . t("You may re-enable the drag and drop interface at any time by reducing multiple parents to a single parent for the terms in this vocabulary.") . '</p>';
- return confirm_form($form, $question, drupal_get_destination(), $description, t('Set multiple parents'));
-}
-
-/**
* Form builder for the term delete form.
*
* @ingroup forms