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

18 Zeilen
517 B
Handlebars

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