Merge pull request #663 from NeoRaider/styleable-checkboxes
[project/luci.git] / applications / luci-app-travelmate / luasrc / model / cbi / travelmate.lua
1 -- Licensed to the public under the Apache License 2.0.
2
3 m = Map("travelmate", translate("Travelmate"),
4         translate("Configuration of the Travelmate package to enable travel router functionality. ") .. [[</p>]] ..
5         translate("Brief advice: Create a wwan interface, configure it to use dhcp and " ..
6                 "add it to the wan zone in firewall. Create the wifi interfaces to be used ('client' mode, " ..
7                 "assigned to wwan network, left as disabled). Travelmate will try " ..
8                 "to connect to the known wifi client interfaces in the defined order. ") ..
9         [[<a href="https://github.com/openwrt/packages/tree/master/net/travelmate/files/README.md" target="_blank">]] 
10         .. translate("Link to detailed advice")
11         .. [[</a>]] )
12
13 -- General options
14
15 s = m:section(NamedSection, "global", "travelmate", translate("Global options"))
16
17 o = s:option(Flag, "trm_enabled", translate("Enable Travelmate"))
18 o.rmempty = false
19 o.default = 0
20
21 o = s:option(Value, "trm_loop", translate("Loop timeout in seconds for wlan monitoring"),
22         translate("Default 30, range 5-60"))
23 o.rmempty = false
24 o.default = 30
25 o.datatype = "range(5,60)"
26
27 o = s:option(Value, "trm_maxretry", translate("Max. number of connection retries to an uplink"),
28         translate("Default 3, range 0-10. Set to 0 to allow unlimited retries"))
29 o.rmempty = false
30 o.default = 3
31 o.datatype = "range(0,10)"
32
33 -- Extra options
34
35 e = m:section(NamedSection, "global", "travelmate", translate("Extra options"))
36
37 a = e:option(Flag, "trm_debug", translate("Debug logging"))
38 a.rmempty = true
39 a.default = a.disabled
40
41 a = e:option(Value, "trm_device", translate("Use only one radio, e.g. 'radio0'"),
42         translate("Default: empty = use all radios."))
43 a.rmempty = true
44 a.default = ""
45 a.datatype = "uciname"
46
47 a = e:option(Flag, "trm_iw", translate("Use iw for scanning"),
48         translate("Disable this if you want to use iwinfo instead of iw"))
49 a.rmempty = true
50 a.default = a.enabled
51
52 return m
53