]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12130 fixed regression - disabledIf did not work in dateselectors; merged from...
authorskodak <skodak>
Sat, 24 Nov 2007 13:37:07 +0000 (13:37 +0000)
committerskodak <skodak>
Sat, 24 Nov 2007 13:37:07 +0000 (13:37 +0000)
lib/formslib.php

index 22d69acc79a97ff4db9d3d612a91c743d0c27d89..dd22a58bb2aa1aa9b04c167db508b02388384910 100644 (file)
@@ -1339,7 +1339,12 @@ function validate_' . $this->_formName . '(frm) {
             $elsInGroup = $element->getElements();
             $elNames = array();
             foreach ($elsInGroup as $elInGroup){
-                $elNames = array_merge($elNames, $this->_getElNamesRecursive($elInGroup));
+                if (is_a($elInGroup, 'HTML_QuickForm_group')) {
+                    // not sure if this would work - groups nested in groups
+                    $elNames = array_merge($elNames, $this->_getElNamesRecursive($elInGroup));
+                } else {
+                    $elNames[] = $element->getElementName($elInGroup->getName());
+                }
             }
 
         } else if (is_a($element, 'HTML_QuickForm_header')) {