summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-28 09:51:54 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-28 09:51:54 +0200
commit428e3bd6dc0afcc1ff1c2a62506d66bebc59976f (patch)
tree2b5cadad8308f7342af5e4be4be4f6595c814bcd /modules/luci-base/htdocs/luci-static/resources
parentdaa318c1b2cde1be9df370b1794d660902feab6b (diff)
luci-base: form.js: toggle inactive CSS class on unsatisfied field cells
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/form.js4
1 files changed, 4 insertions, 0 deletions
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;
}