mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-26649 forms: ensure that both necessary variables are set before altering calendar image
This commit is contained in:
parent
d2b11df8bd
commit
1711361042
6
lib/form/yui/dateselector/dateselector.js
vendored
6
lib/form/yui/dateselector/dateselector.js
vendored
@ -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);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user