luci-base: ui.js: assume select widget by default for ListValue widget
authorJo-Philipp Wich <jo@mein.io>
Tue, 28 Apr 2020 13:37:02 +0000 (15:37 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 28 Apr 2020 13:37:02 +0000 (15:37 +0200)
Fixes: #3973
Fixes: 2fb55e1ab ("luci-base: ui.js: fixes for radio widget type of select element")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 991991de4f42ccdebb72e740819a9adb974b4752..612f74776e7ff1b62da18f30d837d61e9b18fac0 100644 (file)
@@ -712,7 +712,7 @@ var UISelect = UIElement.extend(/** @lends LuCI.ui.Select.prototype */ {
                else if (Array.isArray(this.options.sort))
                        keys = this.options.sort;
 
-               if (this.options.widget == 'select') {
+               if (this.options.widget != 'radio' && this.options.widget != 'checkbox') {
                        frameEl.appendChild(E('select', {
                                'id': this.options.id ? 'widget.' + this.options.id : null,
                                'name': this.options.name,