luci-base: form.js: toggle inactive CSS class on unsatisfied field cells

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-04-28 09:51:54 +02:00
parent daa318c1b2
commit 428e3bd6dc

View file

@ -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;
}