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

27 Zeilen
590 B
Handlebars

2023-07-10 08:55:54 +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}}
{{i18n "wizard.uploading"}}
2018-09-09 15:03:46 +02:00
{{else}}
{{i18n "wizard.upload"}}
{{d-icon "upload"}}
2018-09-09 15:03:46 +02:00
{{/if}}
2023-07-10 08:55:54 +02:00
<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}}
2023-07-10 08:55:54 +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}}
2023-07-10 08:55:54 +02:00
{{/if}}