o4.default = o4.enabled
o4.rmempty = false
-o5 = s:option(ListValue, "trm_iface", translate("Uplink / Trigger interface"),
+o5 = s:option(Flag, "trm_autoadd", translate("Add Open Uplinks"),
+ translate("Automatically add open uplinks like hotel captive portals to your wireless config."))
+o5.default = o5.disabled
+o5.rmempty = false
+
+o6 = s:option(ListValue, "trm_iface", translate("Uplink / Trigger interface"),
translate("Name of the used uplink interface."))
if dump then
local i, v
for i, v in ipairs(dump.interface) do
if v.interface ~= "loopback" and v.interface ~= "lan" then
local device = v.l3_device or v.device or "-"
- o5:value(v.interface, v.interface.. " (" ..device.. ")")
+ o6:value(v.interface, v.interface.. " (" ..device.. ")")
end
end
end
-o5.default = trmiface
-o5.rmempty = false
+o6.default = trmiface
+o6.rmempty = false
-- Runtime information
end
local login_section = (m.hidden.ssid or "") .. (m.hidden.bssid or "")
-login_section = login_section.lower(login_section:gsub("[^%w_]", "_"))
+login_section = login_section:gsub("[^%w_]", "_")
local cmd = uci:get("travelmate", login_section, "command")
cmd_list = m:field(ListValue, "cmdlist", translate("Auto Login Script"),
translate("External script reference which will be called for automated captive portal logins."))
uci:set("wireless", newsection, "encryption", "none")
end
local login_section = (wssid:formvalue(section) or "") .. (bssid:formvalue(section) or "")
- login_section = login_section.lower(login_section:gsub("[^%w_]", "_"))
+ login_section = login_section:gsub("[^%w_]", "_")
if not uci:get("travelmate", login_section) and cmd_list:formvalue(section) ~= "none" then
uci:set("travelmate", login_section, "login")
end
end
local login_section = (s.ssid or "") .. (s.bssid or "")
- login_section = login_section.lower(login_section:gsub("[^%w_]", "_"))
+ login_section = login_section:gsub("[^%w_]", "_")
local cmd = uci:get("travelmate", login_section, "command")
cmd_list = m:field(ListValue, "cmdlist", translate("Auto Login Script"),
translate("External script reference which will be called for automated captive portal logins."))
end
end
local login_section = (wssid:formvalue(section) or "") .. (bssid:formvalue(section) or "")
- login_section = login_section.lower(login_section:gsub("[^%w_]", "_"))
+ login_section = login_section:gsub("[^%w_]", "_")
if not uci:get("travelmate", login_section) and cmd_list:formvalue(section) ~= "none" then
uci:set("travelmate", login_section, "login")
end