summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-10-01 09:33:36 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-10-01 09:33:36 +0000
commit7981c2382d89e36fab1a6439fadea2b59d26d2ab (patch)
treebebf0b8835c3348e2b3cf4a479b90cec484c0e46 /modules
parent68bf126e8144aa89a9915d6fd940b7c4cecfc76f (diff)
modules/admin-full: fix file uploads on wifi page
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua27
1 files changed, 15 insertions, 12 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
index d0ebba215..b18d14251 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@ -48,19 +48,22 @@ if not wnet or not wdev then
end
-- wireless toggle was requested, commit and reload page
-if m:formvalue("cbid.wireless.%s.__toggle" % wdev:name()) then
- if wdev:get("disabled") == "1" or wnet:get("disabled") == "1" then
- wnet:set("disabled", nil)
- else
- wnet:set("disabled", "1")
- end
- wdev:set("disabled", nil)
+function m.parse(map)
+ if m:formvalue("cbid.wireless.%s.__toggle" % wdev:name()) then
+ if wdev:get("disabled") == "1" or wnet:get("disabled") == "1" then
+ wnet:set("disabled", nil)
+ else
+ wnet:set("disabled", "1")
+ end
+ wdev:set("disabled", nil)
- nw:commit("wireless")
- luci.sys.call("(env -i /sbin/wifi down; env -i /sbin/wifi up) >/dev/null 2>/dev/null")
+ nw:commit("wireless")
+ luci.sys.call("(env -i /sbin/wifi down; env -i /sbin/wifi up) >/dev/null 2>/dev/null")
- luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless", arg[1]))
- return
+ luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless", arg[1]))
+ return
+ end
+ Map.parse(map)
end
m.title = luci.util.pcdata(wnet:get_i18n())
@@ -353,7 +356,7 @@ if hwtype == "mac80211" then
s:taboption("advanced", Value, "frag", translate("Fragmentation Threshold"))
s:taboption("advanced", Value, "rts", translate("RTS/CTS Threshold"))
-
+
mp = s:taboption("macfilter", ListValue, "macfilter", translate("MAC-Address Filter"))
mp:value("", translate("disable"))
mp:value("allow", translate("Allow listed only"))