From 421dd407f0ec91cc4439f1b35f6beb5152d79b83 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Thu, 5 Apr 2018 22:39:46 +0200 Subject: luci-app-travelmate: bugfixes * use the form() action to invoke the SimpleForm models * fix 'wifi_add' input form Signed-off-by: Dirk Brenken --- .../luasrc/model/cbi/travelmate/wifi_add.lua | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua') 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 991e75a7e4..f1adae2854 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 @@ -30,22 +30,19 @@ 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 "" end +wssid.datatype = "rangelength(1,32)" +wssid.default = m.hidden.ssid or "" -nobssid = m:field(Flag, "no_bssid", translate("Ignore BSSID")) +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" if m.hidden.ssid == "" then - nobssid.default = nobssid.disabled + bssid.default = m.hidden.bssid or "" else - nobssid.default = nobssid.enabled + bssid.default = "" end -bssid = m:field(Value, "bssid", translate("BSSID")) -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") -- cgit v1.2.3