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
2024-11-22 16:45:50 +01:00

26 Zeilen
Kein EOL
734 B
Handlebars

<div class={{this.wrapperClass}}>
<input
{{did-insert this.setup}}
disabled={{this.uppyUpload.uploading}}
id={{this.inputId}}
class="hidden-upload-field"
type="file"
accept={{this.field.file_types}}
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}}
{{/if}}
</div>