diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-10 21:54:10 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-10 21:54:10 +0000 |
commit | c073e88c56909424ba3aa164b43d26374918cbb7 (patch) | |
tree | f7d3a90de1ce9ba7c295085ed3742a44a09428db /modules/taxonomy/taxonomy.module | |
parent | a4a592dd067362f69c8291d977c619e39d76c031 (diff) | |
download | brdo-c073e88c56909424ba3aa164b43d26374918cbb7.tar.gz brdo-c073e88c56909424ba3aa164b43d26374918cbb7.tar.bz2 |
#199640 by webernet: (usability) add option to select no taxonomy term in multiselect forms, not to rely on browser trickery
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 48187f971..2d15b7106 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -412,11 +412,13 @@ function taxonomy_del_term($tid) { function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') { $vocabulary = taxonomy_vocabulary_load($vid); $help = ($help) ? $help : $vocabulary->help; - $blank = 0; if (!$vocabulary->multiple) { $blank = ($vocabulary->required) ? t('- Please choose -') : t('- None selected -'); } + else { + $blank = ($vocabulary->required) ? 0 : t('- None -'); + } return _taxonomy_term_select(check_plain($vocabulary->name), $name, $value, $vid, $help, intval($vocabulary->multiple), $blank); } |