1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/templates/components/wizard-field-upload.hbs

21 Zeilen
584 B
Handlebars

<label class="wizard-btn wizard-btn-upload-file {{if uploading 'disabled'}}">
2018-09-09 15:03:46 +02:00
{{#if uploading}}
{{i18n "wizard.uploading"}}
{{else}}
{{i18n "wizard.upload"}}
{{d-icon "upload"}}
2018-09-09 15:03:46 +02:00
{{/if}}
2019-07-19 05:47:17 +02:00
<input disabled={{uploading}} type="file" accept="{{field.file_types}}" style="visibility: hidden; position: absolute;" />
2018-09-09 15:03:46 +02:00
</label>
{{#if field.value}}
<a href="{{field.value.url}}" class="filename">
{{#unless isImage}}
{{field.value.original_filename}}
{{else}}
<img src={{field.value.url}} class="wizard-image-preview">
{{/unless}}
</a>
{{/if}}