summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-12-08 12:38:51 +0100
committerJo-Philipp Wich <jo@mein.io>2023-12-08 12:38:51 +0100
commit4b6b00927b4a1076ed8bf23f3a0327a335ebece5 (patch)
tree1c9a8ffa9e16fca2d36fa1911e8777d2870ec9a4 /modules/luci-mod-network/htdocs/luci-static/resources
parent6bdc5771095627889d43a1cbdc4fc45e3b0e5537 (diff)
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 <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
index 092bbbc14a..318373c7c7 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js
@@ -198,7 +198,7 @@ var cbiFlagTristate = form.ListValue.extend({
this.vallist[0] = sysdef ? _('automatic (enabled)') : _('automatic (disabled)');
}
- return this.super('renderWidget', [section_id, option_index, cfgvalue]);
+ return this.super('renderWidget', [section_id, option_index, cfgvalue ? cfgvalue + '!' : null]);
}
});