From: Jo-Philipp Wich Date: Tue, 28 Apr 2020 07:51:54 +0000 (+0200) Subject: luci-base: form.js: toggle inactive CSS class on unsatisfied field cells X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=750572d6303cd2c6a5cc031f108650e9e3347488;p=oweals%2Fluci.git luci-base: form.js: toggle inactive CSS class on unsatisfied field cells Signed-off-by: Jo-Philipp Wich (cherry picked from commit 428e3bd6dc0afcc1ff1c2a62506d66bebc59976f) --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 0e48041cb..2cd06d190 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; }