0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-24 10:20:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/custom-wizard-field-upload.hbs

26 Zeilen
734 B
Handlebars

<div class={{this.wrapperClass}}>
2023-07-10 08:55:54 +02:00
<input
{{did-insert this.setup}}
disabled={{this.uppyUpload.uploading}}
id={{this.inputId}}
2023-07-10 08:55:54 +02:00
class="hidden-upload-field"
type="file"
accept={{this.field.file_types}}
2023-07-10 08:55:54 +02:00
style="visibility: hidden; position: absolute;"
/>
<DButton
@translatedLabel={{this.uploadLabel}}
@translatedTitle={{this.uploadLabel}}
@icon="upload"
@disabled={{this.uppyUpload.uploading}}
@action={{this.chooseFiles}}
class="wizard-btn wizard-btn-upload-file"
/>
{{#if this.field.value}}
{{#if this.isImage}}
<img src={{this.field.value.url}} class="wizard-image-preview" />
{{else}}
{{this.field.value.original_filename}}
{{/if}}
2021-04-12 16:19:53 +02:00
{{/if}}
</div>