ui/app/components/form-value-array/template.hbs

27 lines
965 B
Handlebars

<button class="btn bg-link icon-btn" {{action "add"}}><i class="icon icon-plus text-small"/> <span>{{t addActionLabel}}</span></button>
{{#if ary.length}}
<table class="table fixed no-lines mt-20">
<tr class="text-muted hidden-xs hidden-sm">
<th>{{t valueLabel}}</th>
<th width="30">&nbsp;</th>
</tr>
{{#each ary as |row|}}
<tr>
<td data-title="{{t valueLabel}}">
{{input-paste pasted="pastedValues" class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}}
</td>
<td class="text-right">
<button class="btn bg-primary btn-sm" {{action "remove" row}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button>
</td>
</tr>
{{/each}}
</table>
{{#if showProTip}}
<div class="text-info" style="font-size: 12px; margin-bottom: 12px;">
{{t 'formValueArray.protip'}}
</div>
{{/if}}
{{/if}}