MDL-19030 fixed xhtml strictness when label attached to frozen element; merged from MOODLE_19_STABLE

This commit is contained in:
skodak 2009-04-30 09:50:02 +00:00
parent fc3ec2ca24
commit 8c453e41f7

View File

@ -186,7 +186,7 @@ class HTML_QuickForm_Renderer_Tableless extends HTML_QuickForm_Renderer_Default
} else {
$id = $element->getName();
}
if (!empty($id)) {
if (!empty($id) and !$element->isFrozen()) { // moodle hack
$html = str_replace('<label', '<label for="' . $id . '"', $html);
$element_html = preg_replace('#name="' . $id . '#',
'id="' . $id . '" name="' . $id . '',