From 406da0dcecd4f71edd9110ec2d98ef0b3f3e74a7 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 22 Aug 2022 14:59:06 +0200 Subject: [PATCH] propagate label to et2-button to show it (use label="" to show just the icon) --- api/js/etemplate/et2_widget_file.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/et2_widget_file.ts b/api/js/etemplate/et2_widget_file.ts index ce2b77f86d..975ba47f63 100644 --- a/api/js/etemplate/et2_widget_file.ts +++ b/api/js/etemplate/et2_widget_file.ts @@ -182,6 +182,7 @@ export class et2_file extends et2_inputWidget this.span = jQuery(document.createElement("et2-button")) .addClass('et2_file_span') .attr("image", "attach") + .attr('label', this.options.label || '') .attr("noSubmit", true) .appendTo(this.node); @@ -767,6 +768,4 @@ export class et2_file extends et2_inputWidget } } } -et2_register_widget(et2_file, ["file"]); - - +et2_register_widget(et2_file, ["file"]); \ No newline at end of file