Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-13983' of git://github.com/timhunt/moodle

  • Loading branch information...
commit 85f1abe30422e861b294d7314fa4b5a99d34b62b 2 parents 9fed82d + 1e668c4
@samhemelryk samhemelryk authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/form/radio.php
View
15 lib/form/radio.php
@@ -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>';
Please sign in to comment.
Something went wrong with that request. Please try again.