mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Some changes for XHTML and accessibility compliance
This commit is contained in:
parent
857e46c39a
commit
72b4e28353
3 changed files with 14 additions and 5 deletions
|
@ -667,9 +667,15 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
|
|||
$output .= " <option value=\"javascript:void(0)\">$nothing</option>\n";
|
||||
}
|
||||
|
||||
$inoptgroup = false;
|
||||
foreach ($options as $value => $label) {
|
||||
if (substr($label,0,2) == '--') {
|
||||
$output .= ' <optgroup label="'. $label .'"></optgroup>'; // Plain labels
|
||||
if ($inoptgroup) {
|
||||
$output .= ' </optgroup>';
|
||||
} else {
|
||||
$inoptgroup = true;
|
||||
}
|
||||
$output .= ' <optgroup label="'. $label .'">'; // Plain labels
|
||||
continue;
|
||||
} else {
|
||||
$output .= ' <option value="'. $common . $value .'"';
|
||||
|
@ -683,6 +689,9 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
|
|||
$output .= '>'. $value .'</option>' . "\n";
|
||||
}
|
||||
}
|
||||
if ($inoptgroup) {
|
||||
$output .= ' </optgroup>';
|
||||
}
|
||||
$output .= '</select>';
|
||||
$output .= '</form>' . "\n";
|
||||
|
||||
|
@ -3390,4 +3399,4 @@ function print_speller_button () {
|
|||
echo '<input type="button" value="Check spelling" onclick="openSpellChecker();" />'."\n";
|
||||
}
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue