* Prepare german translation cleanup
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_wifi / networks.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2008 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 m = Map("wireless", translate("networks"), translate("a_w_networks1"))
15
16 s = m:section(TypedSection, "wifi-iface", "")
17 s.addremove = true
18 s.anonymous = true
19
20 s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
21
22 device = s:option(ListValue, "device", translate("device"))
23 luci.model.uci.foreach("wireless", "wifi-device",
24         function (section)
25                 device:value(section[".name"])
26         end)
27
28 network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
29 network:value("")
30 luci.model.uci.foreach("network", "interface",
31         function (section)
32                 if section[".name"] ~= "loopback" then
33                         network:value(section[".name"])
34                 end
35         end)
36
37 mode = s:option(ListValue, "mode", translate("mode"))
38 mode:value("ap", "Access Point")
39 mode:value("adhoc", "Ad-Hoc")
40 mode:value("sta", "Client")
41 mode:value("wds", "WDS")
42
43 s:option(Value, "bssid", "BSSID").optional = true
44
45 s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
46
47 s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
48 s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
49
50
51 encr = s:option(ListValue, "encryption", translate("encryption"))
52 encr:value("none", "keine")
53 encr:value("wep", "WEP")
54 encr:value("psk", "WPA-PSK")
55 encr:value("wpa", "WPA-Radius")
56 encr:value("psk2", "WPA2-PSK")
57 encr:value("wpa2", "WPA2-Radius")
58
59 key = s:option(Value, "key", translate("key"))
60 key:depends("encryption", "wep")
61 key:depends("encryption", "psk")
62 key:depends("encryption", "wpa")
63 key:depends("encryption", "psk2")
64 key:depends("encryption", "wpa2")
65 key.rmempty = true
66
67 server = s:option(Value, "server", translate("a_w_radiussrv"))
68 server:depends("encryption", "wpa")
69 server:depends("encryption", "wpa2")
70 server.rmempty = true
71
72 port = s:option(Value, "port", translate("a_w_radiusport"))
73 port:depends("encryption", "wpa")
74 port:depends("encryption", "wpa2")
75 port.rmempty = true
76
77 s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
78
79 s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true
80
81
82
83 return m