From: skodak Date: Sat, 24 Nov 2007 13:37:07 +0000 (+0000) Subject: MDL-12130 fixed regression - disabledIf did not work in dateselectors; merged from... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e850ec48469f3cbfdb4d073ffd67d3812d09ba3a;p=moodle.git MDL-12130 fixed regression - disabledIf did not work in dateselectors; merged from MOODLE_19_STABLE --- diff --git a/lib/formslib.php b/lib/formslib.php index 22d69acc79..dd22a58bb2 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -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')) {