Skip to content

Commit

Permalink
some xhtml validity fixes for the case that select and text elements …
Browse files Browse the repository at this point in the history
…are 'frozen'
  • Loading branch information
jamiesensei committed Jan 11, 2007
1 parent 016bac4 commit 0709d4d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/form/select.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ function removeOptions()
{
$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 changes: 14 additions & 0 deletions lib/form/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,18 @@ function setHelpButton($helpbuttonargs, $function='helpbutton'){
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';
}
}
}

0 comments on commit 0709d4d

Please sign in to comment.