MDL-7861 xhtml strict fixes - do not add label for static element in formslib

This commit is contained in:
skodak 2007-01-06 20:45:17 +00:00
parent 2c94b1cea6
commit 217d03a14c

View file

@ -1359,6 +1359,9 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
$html = str_replace('{help}', '', $html);
}
if ($element->getType() == 'static') {
$html = preg_replace('|<label.*?</label>|i', '', $html); //xhtml compliance - no label for static content
}
$this->_templates[$element->getName()] = $html;
if (!is_null($element->getAttribute('id'))) {
$id = $element->getAttribute('id');