Commit c073e88c authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#199640 by webernet: (usability) add option to select no taxonomy term in...

#199640 by webernet: (usability) add option to select no taxonomy term in multiselect forms, not to rely on browser trickery
parent a4a592dd
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment