MDL-46467 forms: Labels have "for" attribute even when frozen
This commit is contained in:
@@ -186,7 +186,7 @@ class HTML_QuickForm_Renderer_Tableless extends HTML_QuickForm_Renderer_Default
|
||||
} else {
|
||||
$id = $element->getName();
|
||||
}
|
||||
if (!empty($id) and !$element->isFrozen() and !is_a($element, 'MoodleQuickForm_group') and !is_a($element, 'HTML_QuickForm_static')) { // moodle hack
|
||||
if (!empty($id) and !is_a($element, 'MoodleQuickForm_group') and !is_a($element, 'HTML_QuickForm_static')) { // moodle hack
|
||||
$html = str_replace('<label', '<label for="' . $id . '"', $html);
|
||||
$element_html = preg_replace('#name="' . $id . '#',
|
||||
'id="' . $id . '" name="' . $id . '',
|
||||
|
||||
Reference in New Issue
Block a user