modules/admin-full: Added support for interface aliases
[project/luci.git] / applications / luci-splash / luasrc / model / cbi / splash / splash.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 require("luci.model.uci")
3
4 m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]])
5
6 s = m:section(NamedSection, "general", "core", "Allgemein")
7 s:option(Value, "leasetime", "Freigabezeit", "h")
8
9 s = m:section(TypedSection, "iface", "Schnittstellen")
10 s.template = "cbi/tblsection"
11 s.addremove = true
12 s.anonymous = true
13
14 zone = s:option(ListValue, "zone", "Firewallzone")
15 luci.model.uci.foreach("firewall", "zone",
16         function (section)
17                 zone:value(section.name)
18         end)
19         
20 iface = s:option(ListValue, "network", "Netzwerk")
21 luci.model.uci.foreach("network", "interface",
22         function (section)
23                 if section[".name"] ~= "loopback" then
24                         iface:value(section[".name"])
25                 end
26         end)
27         
28 luci.model.uci.foreach("network", "alias",
29         function (section)
30                 iface:value(section[".name"])
31         end)
32
33 s = m:section(TypedSection, "whitelist", "Automatische Freigabe")
34 s.template = "cbi/tblsection"
35 s.addremove = true
36 s.anonymous = true
37 s:option(Value, "mac", "MAC-Adresse")
38
39 s = m:section(TypedSection, "blacklist", "Automatische Sperrung")
40 s.template = "cbi/tblsection"
41 s.addremove = true
42 s.anonymous = true
43 s:option(Value, "mac", "MAC-Adresse")
44         
45 return m