From: jamiesensei Date: Thu, 12 Jul 2007 06:01:17 +0000 (+0000) Subject: Reverted previous fix for MDL-10382 Allow removing of elements with disabledIf... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=df2c2310e52429584f5bf43b3ee46de19b10b13e;p=moodle.git Reverted previous fix for MDL-10382 Allow removing of elements with disabledIf conditions - "This fix has broken disabledIf in many forms. The problem is that if the dependentOn element is an element in a group then elementExists will return false." --- diff --git a/lib/formslib.php b/lib/formslib.php index 44ee8c01a6..bd03590cc5 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1219,9 +1219,6 @@ function validate_' . $this->_formName . '(frm) { $js .= "var $iname = Array();\n"; foreach ($this->_dependencies as $dependentOn => $conditions){ - if (!$this->elementExists($dependentOn)) { - continue; - } $js .= "{$iname}['$dependentOn'] = Array();\n"; foreach ($conditions as $condition=>$values) { $js .= "{$iname}['$dependentOn']['$condition'] = Array();\n";