luci-app-travelmate: bring back cbi element to wifi_add.lua
[project/luci.git] / applications / luci-app-travelmate / luasrc / model / cbi / travelmate / wifi_add.lua
index 991e75a..83011e9 100644 (file)
@@ -30,9 +30,9 @@ 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"))
 if m.hidden.ssid == "" then
@@ -41,7 +41,8 @@ else
        nobssid.default = nobssid.enabled
 end
 
-bssid = m:field(Value, "bssid", translate("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:depends("no_bssid", 0)
 bssid.datatype = "macaddr"
 bssid.default = m.hidden.bssid or ""