luci-mod-network: properly reflect config state in sysfs tristates
authorJo-Philipp Wich <[email protected]>
Fri, 8 Dec 2023 11:38:51 +0000 (12:38 +0100)
committerJo-Philipp Wich <[email protected]>
Fri, 8 Dec 2023 11:41:46 +0000 (12:41 +0100)
commit63e2edf9e848d95e60327ef66953ddc21cf3fbab
tree29472f9d15f8c402705b643a071667867862b5e5
parent3cb6cf6740683123a4c156afe74af92f3066e37c
luci-mod-network: properly reflect config state in sysfs tristates

When a boolean sysfs option is forcibly set to `0` or `1` in uci, then make
sure to properly reflect that choice state when rendering the widget.

Right now the dropdown incorrectly reverted to "automatic" after saving but
not applying the changes.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 4b6b00927b4a1076ed8bf23f3a0327a335ebece5)
modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js