From 2dde9edc34d8774d4a8210c79361066bcfa2e343 Mon Sep 17 00:00:00 2001 From: "[Freshbyte] Laurentiu Lese" Date: Mon, 22 Jul 2013 14:16:16 +0300 Subject: [PATCH] Issue #2047517: Avoid validation when clicking a term from taxonomy tree. --- taxonomy_manager.admin.inc | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/taxonomy_manager.admin.inc b/taxonomy_manager.admin.inc index d768cc9..8269b6d 100644 --- a/taxonomy_manager.admin.inc +++ b/taxonomy_manager.admin.inc @@ -83,6 +83,7 @@ function taxonomy_manager_form($form, &$form_state, $voc, $tid = 0, $filter = NU $form['load-tid-submit'] = array( '#type' => 'submit', '#value' => 'load term', + '#limit_validation_errors' => array(), '#submit' => array('taxonomy_manager_load_tid_submit'), '#ajax' => array( 'callback' => 'taxonomy_manager_term_data_form_ajax_callback', @@ -205,8 +206,8 @@ function taxonomy_manager_form($form, &$form_state, $voc, $tid = 0, $filter = NU // generate term data form. // Moved this code snippet to the bottom here to prevent needless // expanding of the tree for this tid. - if (isset($form_state['values']['load-tid'])) { - $tid = $form_state['values']['load-tid']; + if (isset($form_state['complete form']['load-tid']['#value'])) { + $tid = $form_state['complete form']['load-tid']['#value']; } // Something on the term data has been submitted, e.g. the 'add another item' // button -- 1.7.6.msysgit.0