diff options
author | Dirk Brenken <dev@brenken.org> | 2018-04-06 18:37:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-06 18:37:33 +0200 |
commit | 52ceba14d96102cfae116de0c938567a025a316b (patch) | |
tree | dfa23617ee45c122682e51380b945b10f63d709f | |
parent | b00b676923a01fed2f3180a598f2e5c28f44f7d2 (diff) | |
parent | 7c7b6f4ba94c499bea4065e1e6b250f44a7fa0d3 (diff) |
Merge pull request #1730 from dibdot/travelmate
luci-app-travelmate: bring back cbi element to wifi_add.lua
-rw-r--r-- | applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua index f1adae285..83011e9dd 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua @@ -34,15 +34,19 @@ end wssid.datatype = "rangelength(1,32)" wssid.default = m.hidden.ssid or "" -bssid = m:field(Value, "bssid", translate("BSSID"), - translatef("The BSSID information '%s' is optional and only required for hidden networks", m.hidden.bssid or "")) -bssid.datatype = "macaddr" +nobssid = m:field(Flag, "no_bssid", translate("Ignore BSSID")) if m.hidden.ssid == "" then - bssid.default = m.hidden.bssid or "" + nobssid.default = nobssid.disabled else - bssid.default = "" + nobssid.default = nobssid.enabled end +bssid = m:field(Value, "bssid", translate("BSSID"), + translatef("The BSSID information '%s' is optional and only required for hidden networks", m.hidden.bssid or "")) +bssid:depends("no_bssid", 0) +bssid.datatype = "macaddr" +bssid.default = m.hidden.bssid or "" + if (tonumber(m.hidden.wep) or 0) == 1 then encr = m:field(ListValue, "encryption", translate("Encryption")) encr:value("wep", "WEP") |