]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 xhtml strict fixes - do not add label for static element in formslib
authorskodak <skodak>
Sat, 6 Jan 2007 20:45:17 +0000 (20:45 +0000)
committerskodak <skodak>
Sat, 6 Jan 2007 20:45:17 +0000 (20:45 +0000)
lib/formslib.php

index 46a7b2e0528b11b215db2f074c13b6c2cebdc158..f2a7cfd40fd74b9ab4ddd04b543f4050065f67f6 100644 (file)
@@ -1359,6 +1359,9 @@ class MoodleQuickForm_Renderer extends HTML_QuickForm_Renderer_Tableless{
             $html = str_replace('{help}', '', $html);
 
         }
+        if ($element->getType() == 'static') {
+            $html = preg_replace('|<label.*?</label>|i', '', $html); //xhtml compliance - no label for static content
+        }
         $this->_templates[$element->getName()] = $html;
         if (!is_null($element->getAttribute('id'))) {
             $id = $element->getAttribute('id');