From 750572d6303cd2c6a5cc031f108650e9e3347488 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 28 Apr 2020 09:51:54 +0200 Subject: [PATCH] luci-base: form.js: toggle inactive CSS class on unsatisfied field cells Signed-off-by: Jo-Philipp Wich (cherry picked from commit 428e3bd6dc0afcc1ff1c2a62506d66bebc59976f) --- modules/luci-base/htdocs/luci-static/resources/form.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 0e48041cb7..2cd06d1901 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1754,6 +1754,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; } -- 2.30.2