MDL-56127 forms: multiple select dependencies fixed

This is a fix for a regressions introduced by MDL-54778. It
seems that escaped all our tests because there isn't any case
of such a dependency in core, but Daniele Cordella was facing
it within his surveypro module.
This commit is contained in:
Eloy Lafuente (stronk7)
2016-09-29 16:53:08 +02:00
parent ddd8dc0d1b
commit 83edfba240
+1
View File
@@ -497,6 +497,7 @@ if (typeof M.form.dependencyManager === 'undefined') {
// Multiple selects can have one or more value assigned. A pipe (|) is used as a value separator
// when multiple values have to be selected at the same time.
values = value.split('|');
selected = [];
this.get('options').each(function() {
if (this.get('selected')) {
selected[selected.length] = this.get('value');