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

19 Zeilen
576 B
Handlebars

2021-04-12 16:19:53 +02:00
<label class="wizard-btn wizard-btn-upload-file {{if uploading "disabled"}}" tabindex={{field.tabindex}}>
2018-09-09 15:03:46 +02:00
{{#if uploading}}
{{wizard-i18n "wizard.uploading"}}
2018-09-09 15:03:46 +02:00
{{else}}
{{wizard-i18n "wizard.upload"}}
{{d-icon "upload"}}
2018-09-09 15:03:46 +02:00
{{/if}}
<input disabled={{uploading}} class="hidden-upload-field" type="file" accept={{field.file_types}} style="visibility: hidden; position: absolute;" >
2018-09-09 15:03:46 +02:00
</label>
{{#if field.value}}
2021-04-12 16:19:53 +02:00
{{#if isImage}}
2020-05-04 10:09:18 +02:00
<img src={{field.value.url}} class="wizard-image-preview">
2021-04-12 16:19:53 +02:00
{{else}}
{{field.value.original_filename}}
{{/if}}
{{/if}}