mirror of https://github.com/rancher/ui.git
65 lines
2.2 KiB
Handlebars
65 lines
2.2 KiB
Handlebars
{{#if (has-block)}}
|
|
{{yield userLabelArray (action "removeLabel") (action "addUserLabel")}}
|
|
{{else}}
|
|
{{#accordion-list-item
|
|
title=(t "formUserLabels.title")
|
|
detail=(t detailKey appName=settings.appName)
|
|
status=status
|
|
statusClass=statusClass
|
|
expandAll=expandAll
|
|
expand=(action expandFn)
|
|
}}
|
|
{{#if userLabelArray.length}}
|
|
<table class="table fixed no-lines mt-20">
|
|
<tr class="hidden-xs hidden-sm">
|
|
<th>{{t "formUserLabels.key.label"}}{{field-required}}</th>
|
|
<th width="30"> </th>
|
|
<th>{{t "formUserLabels.value.label"}}</th>
|
|
<th width="40"> </th>
|
|
</tr>
|
|
{{#each userLabelArray as |label|}}
|
|
<tr>
|
|
<td data-title="key">
|
|
{{input-paste
|
|
pasted=(action "pastedLabels")
|
|
class="form-control input-sm key"
|
|
type="text"
|
|
value=label.key
|
|
placeholder="formUserLabels.key.placeholder"
|
|
disabled=(eq label.readonly true)
|
|
}}
|
|
</td>
|
|
|
|
<td class="text-center">
|
|
<p class="input-sm">{{t "formUserLabels.separator"}}</p>
|
|
</td>
|
|
|
|
<td data-title="label">
|
|
{{input class="form-control input-sm" type="text" value=label.value placeholder=(t "formUserLabels.value.placeholder") disabled=(eq label.readonly true)}}
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
<button type="button" class="btn bg-primary btn-sm" {{action "removeLabel" label}} disabled={{eq
|
|
label.readonly true}}>
|
|
<i class="icon icon-minus" />
|
|
<span class="sr-only">
|
|
{{t "generic.remove"}}
|
|
</span>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
<div class="protip pt-10">
|
|
{{t "formUserLabels.protip"}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<button class="btn bg-link icon-btn" type="button" {{action "addUserLabel" }}>
|
|
<i class="icon icon-plus text-small" />
|
|
<span>{{t "formUserLabels.addAction"}}</span>
|
|
</button>
|
|
|
|
{{/accordion-list-item}}
|
|
{{/if}}
|