luci-base: form.js: do not consider inactive fields for dependency checks
authorJo-Philipp Wich <jo@mein.io>
Wed, 4 Sep 2019 12:19:18 +0000 (14:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 Sep 2019 13:28:16 +0000 (15:28 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/form.js

index 31f6bd9616013f6e5182fea2aae20aa906027259..34fc097958189b7d09720c118a82f2d83be48a8a 100644 (file)
@@ -517,7 +517,7 @@ var CBIAbstractValue = CBINode.extend({
                                else {
                                        var conf = this.uciconfig || this.section.uciconfig || this.map.config,
                                            res = this.map.lookupOption(dep, section_id, conf),
-                                           val = res ? res[0].formvalue(res[1]) : null;
+                                           val = (res && res[0].isActive(res[1])) ? res[0].formvalue(res[1]) : null;
 
                                        istat = (istat && isEqual(val, this.deps[i][dep]));
                                }