2019-10-14 18:23:29 +00:00
|
|
|
<div class="field">
|
|
|
|
<div class="control is-expanded">
|
|
|
|
<label class="is-label">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#if this.label}}
|
|
|
|
{{this.label}}
|
2019-10-14 18:23:29 +00:00
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
<div class="file has-name is-fullwidth">
|
|
|
|
<label class="file-label">
|
2021-12-17 03:44:29 +00:00
|
|
|
<input class="file-input" type="file" onchange={{action "pickedFile"}} data-test-file-input />
|
2019-10-14 18:23:29 +00:00
|
|
|
<span class="file-cta button">
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="upload" class="has-light-grey-text" />
|
2019-10-14 18:23:29 +00:00
|
|
|
Choose a file…
|
|
|
|
</span>
|
2021-12-17 03:44:29 +00:00
|
|
|
<span class="file-name has-text-grey-dark" data-test-text-file-input-label={{true}}>
|
2019-10-14 18:23:29 +00:00
|
|
|
{{or this.fileName "No file chosen"}}
|
|
|
|
</span>
|
|
|
|
{{#if this.fileName}}
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! template-lint-configure no-nested-interactive "warn" }}
|
|
|
|
<button type="button" class="file-delete-button" {{action "clearFile"}} data-test-text-clear>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="x-circle" />
|
2019-10-14 18:23:29 +00:00
|
|
|
</button>
|
2021-12-17 03:44:29 +00:00
|
|
|
{{! template-lint-configure no-nested-interactive "on" }}
|
2019-10-14 18:23:29 +00:00
|
|
|
{{/if}}
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{#if this.fileName}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<p class="help has-text-grey">
|
|
|
|
This file is
|
|
|
|
{{this.fileSize}}
|
|
|
|
and was created on
|
|
|
|
{{date-format this.fileLastModified "MMM dd, yyyy hh:mm:ss a"}}.
|
|
|
|
</p>
|
2019-10-14 18:23:29 +00:00
|
|
|
{{/if}}
|
|
|
|
{{#if @fileHelpText}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<p class="help has-text-grey">
|
|
|
|
{{@fileHelpText}}
|
|
|
|
</p>
|
2019-10-14 18:23:29 +00:00
|
|
|
{{/if}}
|
2021-12-17 03:44:29 +00:00
|
|
|
</div>
|