0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-01 10:57:03 +01:00
discourse-custom-wizard/assets/javascripts/wizard/templates/components/wizard-field-upload.hbs

19 Zeilen
548 B
Handlebars

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