luci-app-travelmate: bring back cbi element to wifi_add.lua

* b00b676 fixed the cbi initialization for SimpleForm, therefore bring
  back "Ignore BSSID" flag with dependent input field

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2018-04-06 18:34:41 +02:00
parent b00b676923
commit 7c7b6f4ba9

View file

@ -34,14 +34,18 @@ end
wssid.datatype = "rangelength(1,32)"
wssid.default = m.hidden.ssid or ""
nobssid = m:field(Flag, "no_bssid", translate("Ignore BSSID"))
if m.hidden.ssid == "" then
nobssid.default = nobssid.disabled
else
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"
if m.hidden.ssid == "" then
bssid.default = m.hidden.bssid or ""
else
bssid.default = ""
end
bssid.default = m.hidden.bssid or ""
if (tonumber(m.hidden.wep) or 0) == 1 then
encr = m:field(ListValue, "encryption", translate("Encryption"))