Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-15 22:32:54 +01:00
18 Zeilen
561 B
Handlebars
18 Zeilen
561 B
Handlebars
<label class="wizard-btn wizard-btn-upload-file {{if uploading 'disabled'}}" tabindex="{{field.tabindex}}">
|
|
{{#if uploading}}
|
|
{{wizard-i18n "wizard.uploading"}}
|
|
{{else}}
|
|
{{wizard-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}}
|