From 17eb3474f53056a2e40d78c6795b5ef0b4e31e46 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 9 Oct 2013 18:59:58 +0000 Subject: [PATCH] luci2: logic fix for initial state of CheckBoxValue widgets --- luci2/htdocs/luci2/luci2.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 3f99565..94bd4b0 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -3612,12 +3612,10 @@ function LuCI2() if (chg) { - val = val ? this.options.enabled : this.options.disabled; - if (this.options.optional && val == this.options.initial) this.map.set(uci.config, uci.section, uci.option, undefined); else - this.map.set(uci.config, uci.section, uci.option, val); + this.map.set(uci.config, uci.section, uci.option, val ? this.options.enabled : this.options.disabled); } return chg; -- 2.11.0