From ed2eb30b32c561963590223c688e8240d1ca21e7 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 14 Nov 2022 11:22:56 -0700 Subject: [PATCH] Fix widgets don't appear disabled when they are --- api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts | 7 +++++-- api/js/etemplate/et2_widget_file.ts | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts b/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts index b79fe555db..29096967c7 100644 --- a/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts +++ b/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts @@ -123,9 +123,12 @@ export class Et2DropdownButton extends Et2widgetWithSelectMixin(Et2Button) { return html` - ${this.label} + + ${this.label} + - + diff --git a/api/js/etemplate/et2_widget_file.ts b/api/js/etemplate/et2_widget_file.ts index 975ba47f63..472953bf4d 100644 --- a/api/js/etemplate/et2_widget_file.ts +++ b/api/js/etemplate/et2_widget_file.ts @@ -755,7 +755,8 @@ export class et2_file extends et2_inputWidget if (typeof _ro != "undefined") { this.options.readonly = _ro; - this.span.toggleClass('et2_file_ro',_ro); + this.span.toggleClass('et2_file_ro', _ro); + this.span[0].readonly = _ro; if (this.options.readonly) { this.span.unbind('click');