summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-02 17:00:33 +0100
committerGitHub <noreply@github.com>2020-11-02 17:00:33 +0100
commitff0d6c5dbc775794fc390918828ff186e0da7c5d (patch)
treefebe71b963d8eb62dd087cf552e63b001611e77a /modules
parentf4ffe0badb1d86340ee14820947268177a4f5e65 (diff)
parent83c912716e482000e92443cffc3202726314f480 (diff)
Merge pull request #4565 from Ansuel/wifi-ap-fix
luci-mod-network: require ssid when join hidden wifi
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index 9669055f1..bb9877217 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -1790,11 +1790,13 @@ return view.extend({
s.handleJoinConfirm = function(radioDev, bss, form, ev) {
var nameopt = L.toArray(form.lookupOption('name', '_new_'))[0],
passopt = L.toArray(form.lookupOption('password', '_new_'))[0],
+ ssidopt = L.toArray(form.lookupOption('ssid', '_new_'))[0],
bssidopt = L.toArray(form.lookupOption('bssid', '_new_'))[0],
zoneopt = L.toArray(form.lookupOption('zone', '_new_'))[0],
replopt = L.toArray(form.lookupOption('replace', '_new_'))[0],
nameval = (nameopt && nameopt.isValid('_new_')) ? nameopt.formvalue('_new_') : null,
passval = (passopt && passopt.isValid('_new_')) ? passopt.formvalue('_new_') : null,
+ ssidval = (ssidopt && ssidopt.isValid('_new_')) ? ssidopt.formvalue('_new_') : null,
bssidval = (bssidopt && bssidopt.isValid('_new_')) ? bssidopt.formvalue('_new_') : null,
zoneval = zoneopt ? zoneopt.formvalue('_new_') : null,
enc = L.isObject(bss.encryption) ? bss.encryption : null,
@@ -1841,6 +1843,9 @@ return view.extend({
uci.set('wireless', section_id, 'bssid', bss.bssid);
}
+ if (ssidval != null)
+ uci.set('wireless', section_id, 'ssid', ssidval);
+
if (is_sae) {
uci.set('wireless', section_id, 'encryption', 'sae');
uci.set('wireless', section_id, 'key', passval);
@@ -1911,6 +1916,11 @@ return view.extend({
]).then(this.renderContents.bind(this));
};
+ if (bss.ssid == null) {
+ name = s2.option(form.Value, 'ssid', _('Network SSID'), _('The correct SSID must be manually specified when joining a hidden wireless network'));
+ name.rmempty = false;
+ };
+
replace = s2.option(form.Flag, 'replace', _('Replace wireless configuration'), _('Check this option to delete the existing networks from this radio.'));
name = s2.option(form.Value, 'name', _('Name of the new network'), _('The allowed characters are: <code>A-Z</code>, <code>a-z</code>, <code>0-9</code> and <code>_</code>'));