mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-19030 even uglier hack - do not try to add id to labels of static element - they do not have it; merged from MOODLE_19_STABLE
This commit is contained in:
parent
5c89242e50
commit
49ba2b61b9
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ class HTML_QuickForm_Renderer_Tableless extends HTML_QuickForm_Renderer_Default
|
||||||
} else {
|
} else {
|
||||||
$id = $element->getName();
|
$id = $element->getName();
|
||||||
}
|
}
|
||||||
if (!empty($id) and !$element->isFrozen() and !is_a($element, 'MoodleQuickForm_group')) { // moodle hack
|
if (!empty($id) and !$element->isFrozen() and !is_a($element, 'MoodleQuickForm_group') and !is_a($element, 'HTML_QuickForm_static')) { // moodle hack
|
||||||
$html = str_replace('<label', '<label for="' . $id . '"', $html);
|
$html = str_replace('<label', '<label for="' . $id . '"', $html);
|
||||||
$element_html = preg_replace('#name="' . $id . '#',
|
$element_html = preg_replace('#name="' . $id . '#',
|
||||||
'id="' . $id . '" name="' . $id . '',
|
'id="' . $id . '" name="' . $id . '',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue