some xhtml validity fixes for the case that select and text elements are 'frozen'

This commit is contained in:
jamiesensei
2007-01-11 04:57:57 +00:00
parent 016bac47b7
commit 0709d4d5f5
2 changed files with 28 additions and 1 deletions
+14 -1
View File
@@ -108,6 +108,19 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
{
$this->_options = array();
} // end func removeOption
/**
* 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';
}
}
}
?>
+14
View File
@@ -75,4 +75,18 @@ class MoodleQuickForm_text extends HTML_QuickForm_text{
function getHelpButton(){
return $this->_helpbutton;
}
/**
* 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';
}
}
}