0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-30 04:30:29 +01:00
discourse-custom-wizard/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs
Angus McLeod 517da30a4c
DEV: Use uppy in upload field (#167)
* Move from jquery uploads to uppy.js

* Apply prettier and update version
2021-12-16 13:56:44 +05:30

18 Zeilen
576 B
Handlebars

<label class="wizard-btn wizard-btn-upload-file {{if uploading "disabled"}}" tabindex={{field.tabindex}}>
{{#if uploading}}
{{wizard-i18n "wizard.uploading"}}
{{else}}
{{wizard-i18n "wizard.upload"}}
{{d-icon "upload"}}
{{/if}}
<input disabled={{uploading}} class="hidden-upload-field" type="file" accept={{field.file_types}} style="visibility: hidden; position: absolute;" >
</label>
{{#if field.value}}
{{#if isImage}}
<img src={{field.value.url}} class="wizard-image-preview">
{{else}}
{{field.value.original_filename}}
{{/if}}
{{/if}}