Skip to content
Browse files

fixes MDL-9195 mform->hardFreeze() doesn't remove id attribute of lab…

…el for checkbox
  • Loading branch information...
1 parent 78fdca9 commit 1859dfe70deece71db4c0c86aba615ca93bb9ea2 jamiesensei committed Apr 4, 2007
Showing with 14 additions and 0 deletions.
  1. +14 −0 lib/form/checkbox.php
View
14 lib/form/checkbox.php
@@ -99,5 +99,19 @@ function onQuickFormEvent($event, $arg, &$caller)
}
return true;
} // end func onQuickFormEvent
+ /**
+ * Slightly different container template when frozen. Don't want to use a label tag
+ * with a for attribute in that case for the element label but instead use a div.
+ * Templates are defined in renderer constructor.
+ *
+ * @return string
+ */
+ function getElementTemplateType(){
+ if ($this->_flagFrozen){
+ return 'static';
+ } else {
+ return 'default';
+ }
+ }
}
?>

0 comments on commit 1859dfe

Please sign in to comment.
Something went wrong with that request. Please try again.