summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate/luasrc/model
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2018-03-28 09:22:19 +0200
committerDirk Brenken <dev@brenken.org>2018-03-28 09:22:19 +0200
commit189fe1e389fe379528272443f25eb9b2ce7cf4d5 (patch)
tree5737e60cccbb358a3a478e3b86f550c01689a241 /applications/luci-app-travelmate/luasrc/model
parent8d34bf94a66d0fe3b36f064170ae7516f4d78126 (diff)
luci-app-travelmate: made "ignore bssid" flag conditional
* made the "ignore bssid" flag conditional to ease connection to hidden networks: * default for hidden networks "disabled" * default for all others "enabled" Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc/model')
-rw-r--r--applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua12
1 files changed, 8 insertions, 4 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 50edd17bb..e9e1ee40f 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
@@ -26,16 +26,20 @@ m.hidden = {
wpa_version = http.formvalue("wpa_version")
}
-if m.hidden.ssid ~= "" then
+if m.hidden.ssid == "" then
+ wssid = m:field(Value, "ssid", translate("SSID (hidden)"))
+else
wssid = m:field(Value, "ssid", translate("SSID"))
wssid.datatype = "rangelength(1,32)"
wssid.default = m.hidden.ssid or ""
-else
- wssid = m:field(Value, "ssid", translate("SSID (hidden)"))
end
nobssid = m:field(Flag, "no_bssid", translate("Ignore BSSID"))
-nobssid.default = nobssid.enabled
+if m.hidden.ssid == "" then
+ nobssid.default = nobssid.disabled
+else
+ nobssid.default = nobssid.enabled
+end
bssid = m:field(Value, "bssid", translate("BSSID"))
bssid:depends("no_bssid", 0)