mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 14:40:06 +01:00
MDL-60012 form: improve clarity of elementsByName code
This commit is contained in:
parent
8cab0a2571
commit
b67f3bc693
@ -96,7 +96,7 @@ if (typeof M.form.dependencyManager === 'undefined') {
|
||||
allnames[name].push(node);
|
||||
}
|
||||
});
|
||||
this._nameCollections = [names, allnames];
|
||||
this._nameCollections = {names: names, allnames: allnames};
|
||||
},
|
||||
|
||||
/**
|
||||
@ -111,7 +111,7 @@ if (typeof M.form.dependencyManager === 'undefined') {
|
||||
if (includeGroups === undefined) {
|
||||
includeGroups = false;
|
||||
}
|
||||
var collection = (includeGroups ? 1 : 0);
|
||||
var collection = (includeGroups ? 'allnames' : 'names');
|
||||
|
||||
if (!this._nameCollections) {
|
||||
this.initElementsByName();
|
||||
|
Loading…
x
Reference in New Issue
Block a user