]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug 1656 ... labels in menus are non-selectable now
authormoodler <moodler>
Wed, 21 Jul 2004 05:41:58 +0000 (05:41 +0000)
committermoodler <moodler>
Wed, 21 Jul 2004 05:41:58 +0000 (05:41 +0000)
lib/weblib.php

index 74df05723caeb680ca01790d7d6680b45bbc9713..be2280704175127c3666b595c7b3cb817c7794bf 100644 (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) {