ui/lib/shared/addon/components/input-files/template.hbs

38 lines
1.2 KiB
Handlebars

<div class="clearfix mb-20">
{{#if header}}
<div class="pull-left">
<label style="margin-top: 8px;">{{t header}}</label>
{{#if protipLabel}}
<div class="protip">{{t protipLabel appName=settings.appName htmlSafe=true}}</div>
{{/if}}
</div>
{{/if}}
<button class="btn bg-link icon-btn pull-right" style="margin-top: 8px;" {{action "upload"}}>
<span class="darken"><i class="icon icon-upload text-small"/></span>
<span>{{t uploadActionLabel}}</span>
</button>
<button class="btn bg-link icon-btn pull-right mr-10" style="margin-top: 8px;" {{action "add"}}>
<span class="darken"><i class="icon icon-plus text-small"/></span>
<span>{{t addActionLabel}}</span>
</button>
</div>
{{#each ary as |file|}}
{{#input-text-file
accept=accept
classNames='mb-20'
name=file.name
inputName=true
namePlaceholder=namePlaceholder
canChangeName=true
shouldChangeName=(not file.uploaded)
canUpload=false
value=file.value
placeholder=valuePlaceholder
}}
<button class="btn bg-primary" {{action "remove" file}}><i class="icon icon-minus"></i></button>
{{/input-text-file}}
{{/each}}
<input type="file" class="input-files" multiple=true accept="{{actualAccept}}" class="hide">