diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-02-07 11:52:17 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-02-07 11:53:31 +0100 |
commit | f1312cadc6675fb29d02425775dd8a2a533d7e7c (patch) | |
tree | df25b11b8ef0b02a0df8a0c3134d1a0788f3050d /modules/luci-base/htdocs | |
parent | 1597d8e555cfe7444bcbcb44d45caf6954b61b3e (diff) |
luci-proto-openconnect: fix server url validation
The OpenConnect configuration form incorrectly assumed that the server
setting must be hostname while it actually may be a full URL.
Fixes: #6184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 51b6c0902d..9433659f7d 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -820,7 +820,7 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ { 'type': this.options.multiple ? 'checkbox' : 'radio', 'class': this.options.multiple ? 'cbi-input-checkbox' : 'cbi-input-radio', 'value': keys[i], - 'checked': (this.values.indexOf(keys[i]) > -1) ? '' : null, + 'checked': ((!i && !this.values.length) || this.values.indexOf(keys[i]) > -1) ? '' : null, 'disabled': this.options.disabled ? '' : null }), E('label', { 'for': this.options.id ? 'widget.%s.%d'.format(this.options.id, i) : null }), @@ -832,6 +832,9 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ { ])); frameEl.appendChild(brEl.cloneNode()); + + if (!frameEl.querySelector('> span > input[checked]') + frameEl.querySelector('> span > input').checked = true; } } |