diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-20 13:39:22 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-20 13:39:22 +0200 |
commit | f3a94051ec38e7639c074901a20f456647176495 (patch) | |
tree | a780838fe1a1da8d04a7de3120f81f4f1ac98d74 /modules/luci-mod-network/htdocs | |
parent | ccd152361072c9e16dfe4a1fac2d9a5c8af092ba (diff) |
luci-mod-network: fix key option quirk when switching wep and wpa modes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-network/htdocs')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 595cd1e221..f4ded41fe3 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1252,6 +1252,9 @@ return L.view.extend({ o.write = function(section_id, value) { uci.set('wireless', section_id, 'key', value); uci.unset('wireless', section_id, 'key1'); + uci.unset('wireless', section_id, 'key2'); + uci.unset('wireless', section_id, 'key3'); + uci.unset('wireless', section_id, 'key4'); }; @@ -1265,7 +1268,7 @@ return L.view.extend({ o.cfgvalue = function(section_id) { var slot = +uci.get('wireless', section_id, 'key'); - return String((slot >= 1 && slot <= 4) ? slot : 1); + return (slot >= 1 && slot <= 4) ? String(slot) : ''; }; o.write = function(section_id, value) { |