summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-travelmate/luasrc
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2019-10-23 10:42:38 +0200
committerDirk Brenken <dev@brenken.org>2019-10-23 10:42:38 +0200
commit9a47552bd938985879d727e1e28cd34df57de604 (patch)
treeca0889bb17ce18c28b301cca588830e9dd7adae2 /applications/luci-app-travelmate/luasrc
parent199428a9c3fdff57f80afaeb33be615a37bb3f81 (diff)
luci-app-travelmate: WEP-fixes
* fix some more WEP-related form issues Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-travelmate/luasrc')
-rw-r--r--applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_add.lua2
-rw-r--r--applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua2
2 files changed, 4 insertions, 0 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 e0d0cedd7..c93fdd256 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
@@ -172,6 +172,8 @@ cmd_list.default = cmd or "none"
cmd_args.default = cmd_args_default
function wssid.write(self, section, value)
+ login_section = (m.hidden.device or "") .. "_" .. (wssid:formvalue(section) or "") .. "_" .. (bssid:formvalue(section) or "")
+ login_section = login_section:gsub("[^%w_]", "_")
newsection = uci:section("wireless", "wifi-iface", login_section, {
mode = "sta",
network = trmiface,
diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
index 086853171..6c0a3e186 100644
--- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
+++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
@@ -48,6 +48,8 @@ if s ~= nil then
wkey = m:field(Value, "key", translate("Passphrase"))
wkey.datatype = "wepkey"
+ wkey.password = true
+ wkey.default = s.key
elseif string.match(s.encryption, '^wpa') then
encr = m:field(ListValue, "encryption", translate("Encryption"))
encr:value("wpa", "WPA Enterprise")