From 428e3bd6dc0afcc1ff1c2a62506d66bebc59976f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 28 Apr 2020 09:51:54 +0200 Subject: luci-base: form.js: toggle inactive CSS class on unsatisfied field cells Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/form.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/luci-base/htdocs/luci-static/resources') diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index f9a9c5df79..8525937f0b 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1777,6 +1777,10 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa if (field && field.classList.contains('hidden') == active) { field.classList[active ? 'remove' : 'add']('hidden'); + + if (dom.matches(field.parentNode, '.td.cbi-value-field')) + field.parentNode.classList[active ? 'remove' : 'add']('inactive'); + return true; } -- cgit v1.2.3