Fixed bug 1656 ... labels in menus are non-selectable now

This commit is contained in:
moodler
2004-07-21 05:41:58 +00:00
parent f1d2b1ab67
commit 3326450b16
+3 -2
View File
@@ -468,8 +468,9 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="choos
}
foreach ($options as $value => $label) {
if (substr($label,0,1) == "-") {
$output .= " <option value=\"\"";
if (substr($label,0,2) == "--") {
$output .= " <optgroup label=\"$label\"></optgroup>"; // Plain labels
continue;
} else {
$output .= " <option value=\"$common$value\"";
if ($value == $selected) {