summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-18 08:24:42 +0000
committerSteven Barth <steven@midlink.org>2008-07-18 08:24:42 +0000
commitb0f7ffe23762f4165d7b4b3f9b8fbab683c2a906 (patch)
tree29be9e153363ea720e2b860e89bbb19f212d521a /modules/admin-mini
parent5c419acf926b7332976c6a5c1586d2badf9664ae (diff)
A few smaller usability improvements
Diffstat (limited to 'modules/admin-mini')
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/wifi.lua21
1 files changed, 14 insertions, 7 deletions
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua b/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
index d75ead282..f612e9d53 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/wifi.lua
@@ -50,19 +50,26 @@ else
end
mode = s:option(ListValue, "mode", translate("mode"))
-mode:value("ap", "Access Point")
-mode:value("adhoc", "Ad-Hoc")
-mode:value("sta", "Client")
+mode:value("ap", translate("m_w_ap"))
+mode:value("adhoc", translate("m_w_adhoc"))
+mode:value("sta", translate("m_w_client"))
function mode.write(self, section, value)
if value == "sta" then
+ -- ToDo: Move this away
+ if not luci.model.uci.get("network", "wan") then
+ luci.model.uci.set("network", "wan", "interface")
+ luci.model.uci.set("network", "wan", "proto", "none")
+ end
+
luci.model.uci.set("network", "wan", "type", "bridge")
- luci.model.uci.set("wireless", section, "network", "wan")
+ luci.model.uci.save("network")
+
+ self.map:set(section, "network", "wan")
else
- luci.model.uci.delete("network", "wan", "type")
- luci.model.uci.set("wireless", section, "network", "lan")
+ self.map:set(section, "network", "lan")
end
- luci.model.uci.save("network")
+
return ListValue.write(self, section, value)
end