From: Jo-Philipp Wich Date: Wed, 15 Jan 2020 17:52:16 +0000 (+0100) Subject: luci-base: form.js: fix immediate validation of activated options X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e01ef084421350c83dae0d0200a3178e19f010db;p=oweals%2Fluci.git luci-base: form.js: fix immediate validation of activated options When form options are activated because their dependencies are satisified, ensure that an immediate validation is triggered to highlight potential errors without having the user to activate another form control first. Signed-off-by: Jo-Philipp Wich (cherry picked from commit 77c2998f32caccac52a885e84bb6357a9799ebca) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 180cd61a6..8d673a877 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -584,6 +584,7 @@ var CBIAbstractSection = CBINode.extend({ if (isActive != isSatisified) { o.setActive(sid, !isActive); + isActive = !isActive; changed = true; }