luci-base: form.js: do not consider inactive fields for dependency checks

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-09-04 14:19:18 +02:00
parent aef4bc3a23
commit e14b884771

View 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]));
}