Ghost/ghost/admin/app/components/gh-file-input.hbs
Kevin Ansfield 41313f6993 Replaced emberx-file-input addon with in-app implementation
refs https://github.com/TryGhost/Team/issues/1734

- resolves some deprecations raised by the addon which has fallen out of regular maintenance
- we were largely overriding much of the addon so the additional code was minimal, most of the changes were from updating to modern patterns
2022-08-31 22:21:31 +01:00

20 lines
526 B
Handlebars

<span class="x-file-input" {{on "change" this.onChange}} ...attributes>
<input
type="file"
id={{this.inputId}}
class="x-file--input"
name={{@name}}
disabled={{@disabled}}
multiple={{@multiple}}
accept={{@accept}}
{{on "change" this.onChange}}
{{did-insert this.registerFileInput}}
>
<label for="{{this.inputId}}">
{{#if (has-block)}}
{{yield}}
{{else}}
{{this.alt}}
{{/if}}
</label>
</span>