Skip to content
Browse files

MDL-26649 forms: ensure that both necessary variables are set before …

…altering calendar image
  • Loading branch information...
1 parent d2b11df commit 1711361042817bec43fb57173146347b91b0c451 @markn86 markn86 committed with damyon Apr 10, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/form/yui/dateselector/dateselector.js
View
6 lib/form/yui/dateselector/dateselector.js
@@ -86,9 +86,11 @@ YUI.add('moodle-form-dateselector', function(Y) {
node.on('click', this.toggle_calendar_image, this);
// Set the node to the enablecheckbox variable.
this.enablecheckbox = node;
+ }
+ // Ensure that the calendarimage and enablecheckbox values have been set.
+ if (this.calendarimage && this.enablecheckbox) {
// Set the calendar icon status depending on the value of the checkbox.
- // QUICK HACK to keep JS working. MDL-26649. FIXME!
- // this.toggle_calendar_image();
+ this.toggle_calendar_image();
}
}, this);
},

0 comments on commit 1711361

Please sign in to comment.
Something went wrong with that request. Please try again.