mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
Merge branch 'wip-mdl-56210' of https://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
2e5a8fd7aa
2 changed files with 13 additions and 0 deletions
|
@ -23,6 +23,9 @@ if (typeof M.form.dependencyManager === 'undefined') {
|
|||
this._hides = {};
|
||||
this._dirty = {};
|
||||
|
||||
// Let behat know that JS is pending.
|
||||
M.util.js_pending('mform-dependency-manager-' + this.get('form').get('id'));
|
||||
|
||||
// Setup event handlers.
|
||||
Y.Object.each(this.get('dependencies'), function(value, i) {
|
||||
var elements = this.elementsByName(i);
|
||||
|
@ -56,6 +59,9 @@ if (typeof M.form.dependencyManager === 'undefined') {
|
|||
}, this);
|
||||
|
||||
this.updateAllDependencies();
|
||||
|
||||
// Let behat know that JS is complete.
|
||||
M.util.js_complete('mform-dependency-manager-' + this.get('form').get('id'));
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -589,6 +595,12 @@ M.form.initFormDependencies = function(Y, formid, dependencies) {
|
|||
*/
|
||||
M.form.updateFormState = function(formid) {
|
||||
if (formid in M.form.dependencyManagers) {
|
||||
// Let behat know that JS is pending.
|
||||
M.util.js_pending('mform-dependency-manager-' + formid);
|
||||
|
||||
M.form.dependencyManagers[formid].updateAllDependencies();
|
||||
|
||||
// Let behat know that JS is complete.
|
||||
M.util.js_complete('mform-dependency-manager-' + formid);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue