Skip to content

Commit

Permalink
Merge branch 'MDL-13983' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed Mar 14, 2011
2 parents 9fed82d + 1e668c4 commit 85f1abe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/form/radio.php
Expand Up @@ -66,6 +66,21 @@ function getElementTemplateType(){
return 'default';
}
}
/**
* Returns the disabled field. Accessibility: the return "( )" from parent
* class is not acceptable for screenreader users, and we DO want a label.
* @return string
*/
function getFrozenHtml()
{
$output = '<input type="radio" disabled="disabled" id="'.$this->getAttribute('id').'" ';
if ($this->getChecked()) {
$output .= 'checked="checked" />'.$this->_getPersistantData();
} else {
$output .= '/>';
}
return $output;
}
function toHtml()
{
return '<span>' . parent::toHtml() . '</span>';
Expand Down

0 comments on commit 85f1abe

Please sign in to comment.