Skip to content

Commit

Permalink
MDL-19030 very ugly hack - do not try to add id to labels of element …
Browse files Browse the repository at this point in the history
…group - they do not have it; merged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Apr 30, 2009
1 parent 8c453e4 commit 5c89242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pear/HTML/QuickForm/Renderer/Tableless.php
Expand Up @@ -186,7 +186,7 @@ function renderElement(&$element, $required, $error)
} else {
$id = $element->getName();
}
if (!empty($id) and !$element->isFrozen()) { // moodle hack
if (!empty($id) and !$element->isFrozen() and !is_a($element, 'MoodleQuickForm_group')) { // moodle hack
$html = str_replace('<label', '<label for="' . $id . '"', $html);
$element_html = preg_replace('#name="' . $id . '#',
'id="' . $id . '" name="' . $id . '',
Expand Down

0 comments on commit 5c89242

Please sign in to comment.