Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-30658_20' of git://github.com/timhunt/moodle into M…

…OODLE_20_STABLE
  • Loading branch information...
commit b07c46d077c9324fbd863f11a84ec96e0fe38494 2 parents ff6a1ff + 8c70ac0
@stronk7 stronk7 authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/form/form.js
View
8 lib/form/form.js
@@ -237,7 +237,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
_dependency_notchecked : function(elements, value) {
var lock = false;
elements.each(function(){
- if (this.getAttribute('type').toLowerCase()=='hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
+ if (this.getAttribute('type').toLowerCase()=='hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
return;
}
@@ -254,7 +254,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
_dependency_checked : function(elements, value) {
var lock = false;
elements.each(function(){
- if (this.getAttribute('type').toLowerCase()=='hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
+ if (this.getAttribute('type').toLowerCase()=='hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
return;
}
@@ -284,7 +284,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
return;
- } else if (this.getAttribute('type').toLowerCase() == 'hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
+ } else if (this.getAttribute('type').toLowerCase() == 'hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
hidden_val = (this.get('value') == value);
return;
@@ -321,7 +321,7 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
elements.each(function(){
if (this.getAttribute('type').toLowerCase()=='radio' && !Y.Node.getDOMNode(this).checked) {
return;
- } else if (this.getAttribute('type').toLowerCase() == 'hidden' && Y.Node.getDOMNode(this).ancestor('div.felement.fcheckbox')) {
+ } else if (this.getAttribute('type').toLowerCase() == 'hidden' && !this.siblings('input[type=checkbox][name="' + this.get('name') + '"]').isEmpty()) {
// This is the hidden input that is part of an advcheckbox.
hidden_val = (this.get('value') != value);
return;
Please sign in to comment.
Something went wrong with that request. Please try again.