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

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>