]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19030 even uglier hack - do not try to add id to labels of static element - they...
authorskodak <skodak>
Thu, 30 Apr 2009 10:09:13 +0000 (10:09 +0000)
committerskodak <skodak>
Thu, 30 Apr 2009 10:09:13 +0000 (10:09 +0000)
lib/pear/HTML/QuickForm/Renderer/Tableless.php

index f0b0a0480df32c784da94d1b2fc66d9f20f0a761..869006414c222de5c43e4ad3a5e8bce5b88e0ed0 100644 (file)
@@ -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')) { // 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);
                 $element_html = preg_replace('#name="' . $id . '#',
                                              'id="' . $id . '" name="' . $id . '',