summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebflo2011-05-28 09:08:44 (GMT)
committer webflo2011-05-28 09:09:54 (GMT)
commit3d7f1f2b9917ebfe2bfd11a0d0c3b3f31eeda83e (patch)
tree287ecc1da831049c3c790820314eaa91d715b027
parent8a6ce1560307f1d1bd1832e439f4b1bbd1efa36a (diff)
Issue #1170790: hide "Save and translate" if term is language neutral.
-rw-r--r--i18n_taxonomy/i18n_taxonomy.module6
1 files changed, 6 insertions, 0 deletions
diff --git a/i18n_taxonomy/i18n_taxonomy.module b/i18n_taxonomy/i18n_taxonomy.module
index 778c4e6..b20228d 100644
--- a/i18n_taxonomy/i18n_taxonomy.module
+++ b/i18n_taxonomy/i18n_taxonomy.module
@@ -757,6 +757,12 @@ function i18n_taxonomy_form_taxonomy_form_term_alter(&$form, &$form_state) {
'#name' => 'save_translate',
'#value' => t('Save and translate'),
'#weight' => 5,
+ '#states' => array(
+ 'invisible' => array(
+ // Hide the button if term is language neutral.
+ 'select[name=language]' => array('value' => LANGUAGE_NONE),
+ ),
+ ),
);
// Make sure the delete buttons shows up last.
if (isset($form['actions']['delete'])) {