mirror of https://github.com/rancher/ui.git
72 lines
2.0 KiB
Handlebars
72 lines
2.0 KiB
Handlebars
<div>
|
|
<table class="plain" style="width: 100%;">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<label>
|
|
{{t 'formAgentEnvVar.headers.variableName'}}
|
|
{{#if editing}}
|
|
{{field-required}}
|
|
{{/if}}
|
|
</label>
|
|
</th>
|
|
<th class="pl-10">
|
|
<label>{{t 'formAgentEnvVar.headers.value'}}</label>
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each value as |envVar index|}}
|
|
<tr>
|
|
<td>
|
|
{{#input-or-display
|
|
editable=editable
|
|
value=envVar.name
|
|
}}
|
|
{{input
|
|
class="form-control"
|
|
type="text"
|
|
value=envVar.name
|
|
placeholder=(t 'formAgentEnvVar.placeholders.foo')
|
|
}}
|
|
{{/input-or-display}}
|
|
</td>
|
|
<td colspan="2" class="pl-10">
|
|
{{#input-or-display
|
|
editable=editable
|
|
value=envVar.value
|
|
}}
|
|
{{input
|
|
class="form-control"
|
|
type="text"
|
|
value=envVar.value
|
|
placeholder=(t 'formAgentEnvVar.placeholders.bar')
|
|
}}
|
|
{{/input-or-display}}
|
|
</td>
|
|
<td class="valign-top text-right" style="width: 45px">
|
|
{{#if editable}}
|
|
<div>
|
|
<button
|
|
class="btn bg-primary btn-sm" disabled={{eq row.editable false}} type="button" {{action "remove" index}}
|
|
>
|
|
<i class="icon icon-minus"/>
|
|
<span class="sr-only">
|
|
{{t "generic.remove"}}
|
|
</span>
|
|
</button>
|
|
</div>
|
|
{{/if}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
{{#if editable}}
|
|
<button class="btn bg-link icon-btn mt-10" type="button" {{action "add" }}>
|
|
<i class="icon icon-plus text-small" />
|
|
<span>{{t 'formAgentEnvVar.addActionLabel'}}</span>
|
|
</button>
|
|
{{/if}}
|
|
</div> |