summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-05-02 23:51:22 +0200
committerJo-Philipp Wich <jo@mein.io>2020-05-02 23:53:03 +0200
commite3ef463ccdd7d32eef1717203bd872272c57793d (patch)
treed94e507a659abd163c1a1496cca51994917cc555 /modules/luci-base/htdocs/luci-static
parent97bd192c7ec302d3bc18bd9cb6f8a1eacd62fc84 (diff)
luci-base: ui.js: fix input value reading for select widgets
Fixes: #3989 Fixes: 81effc111 ("luci-base: ui.js: assume select widget by default for ListValue widget") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index 73f5b90bc..11c48daae 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -770,7 +770,7 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ {
bind: function(frameEl) {
this.node = frameEl;
- if (this.options.widget == 'select') {
+ if (this.options.widget != 'radio' && this.options.widget != 'checkbox') {
this.setUpdateEvents(frameEl.firstChild, 'change', 'click', 'blur');
this.setChangeEvents(frameEl.firstChild, 'change');
}
@@ -789,7 +789,7 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ {
/** @override */
getValue: function() {
- if (this.options.widget == 'select')
+ if (this.options.widget != 'radio' && this.options.widget != 'checkbox')
return this.node.firstChild.value;
var radioEls = this.node.querySelectorAll('input[type="radio"]');
@@ -802,7 +802,7 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ {
/** @override */
setValue: function(value) {
- if (this.options.widget == 'select') {
+ if (this.options.widget != 'radio' && this.options.widget != 'checkbox') {
if (value == null)
value = '';