luci-base: tools/widgets.js: honour readonly property
authorJo-Philipp Wich <jo@mein.io>
Mon, 13 Apr 2020 14:55:49 +0000 (16:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Apr 2020 15:09:12 +0000 (17:09 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js

index 9cc3e26ed2816daccad2f74b8aa0ca35f88374f0..38693c5b09ec38118a7bd51948e39f61f7b4a23f 100644 (file)
@@ -134,6 +134,7 @@ var CBIZoneSelect = form.ListValue.extend({
                        sort: true,
                        multiple: this.multiple,
                        optional: this.optional || this.rmempty,
+                       disabled: this.readonly,
                        select_placeholder: E('em', _('unspecified')),
                        display_items: this.display_size || this.size || 3,
                        dropdown_items: this.dropdown_size || this.size || 5,
@@ -388,6 +389,7 @@ var CBINetworkSelect = form.ListValue.extend({
                        sort: true,
                        multiple: this.multiple,
                        optional: this.optional || this.rmempty,
+                       disabled: this.readonly,
                        select_placeholder: E('em', _('unspecified')),
                        display_items: this.display_size || this.size || 3,
                        dropdown_items: this.dropdown_size || this.size || 5,
@@ -555,6 +557,7 @@ var CBIDeviceSelect = form.ListValue.extend({
                        sort: order,
                        multiple: this.multiple,
                        optional: this.optional || this.rmempty,
+                       disabled: this.readonly,
                        select_placeholder: E('em', _('unspecified')),
                        display_items: this.display_size || this.size || 3,
                        dropdown_items: this.dropdown_size || this.size || 5,