wifi: add "macaddr" validator to bssid option

Resolves FS#1649

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou 2019-02-26 04:36:32 +00:00
parent c17b62db10
commit e4bbc5970f
2 changed files with 2 additions and 0 deletions

View file

@ -169,6 +169,7 @@ s.addremove = false
s:option(Value, "ssid", translate("Network Name (<abbr title=\"Extended Service Set Identifier\">ESSID</abbr>)")) s:option(Value, "ssid", translate("Network Name (<abbr title=\"Extended Service Set Identifier\">ESSID</abbr>)"))
bssid = s:option(Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>")) bssid = s:option(Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"))
bssid.datatype = "macaddr"
local devs = {} local devs = {}
luci.model.uci.cursor():foreach("wireless", "wifi-device", luci.model.uci.cursor():foreach("wireless", "wifi-device",

View file

@ -396,6 +396,7 @@ ssid:depends({mode="sta-wds"})
ssid:depends({mode="wds"}) ssid:depends({mode="wds"})
bssid = s:taboption("general", Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>")) bssid = s:taboption("general", Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"))
bssid.datatype = "macaddr"
network = s:taboption("general", Value, "network", translate("Network"), network = s:taboption("general", Value, "network", translate("Network"),
translate("Choose the network(s) you want to attach to this wireless interface or " .. translate("Choose the network(s) you want to attach to this wireless interface or " ..