Skip to content

Commit

Permalink
Merge branch 'MDL-25971' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Jan 17, 2011
2 parents 616e81c + 1a09fa6 commit c4592a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/outputcomponents.php
Expand Up @@ -1038,6 +1038,12 @@ public static function select(array $options, $name, $selected = '', $nothing =

$attributes['name'] = $name;

if (!empty($attributes['disabled'])) {
$attributes['disabled'] = 'disabled';
} else {
unset($attributes['disabled']);
}

$output = '';
foreach ($options as $value=>$label) {
if (is_array($label)) {
Expand Down

0 comments on commit c4592a2

Please sign in to comment.