mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
html_writer MDL-25971 Support disabled => boolean, as well as disabled => disabled in html_writer::select.
This commit is contained in:
parent
5a7f931ee5
commit
1a09fa6dfa
1 changed files with 6 additions and 0 deletions
|
@ -1038,6 +1038,12 @@ class html_writer {
|
||||||
|
|
||||||
$attributes['name'] = $name;
|
$attributes['name'] = $name;
|
||||||
|
|
||||||
|
if (!empty($attributes['disabled'])) {
|
||||||
|
$attributes['disabled'] = 'disabled';
|
||||||
|
} else {
|
||||||
|
unset($attributes['disabled']);
|
||||||
|
}
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
foreach ($options as $value=>$label) {
|
foreach ($options as $value=>$label) {
|
||||||
if (is_array($label)) {
|
if (is_array($label)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue