edit host

This commit is contained in:
lvuch 2017-08-21 11:30:45 -07:00
parent 5226d71111
commit 186201bcad
3 changed files with 12 additions and 18 deletions

View File

@ -7,13 +7,12 @@
{{#if ary.length}} {{#if ary.length}}
<table class="table fixed no-lines small mb-10"> <table class="table fixed no-lines small mb-10">
<tr class="hidden-xs hidden-sm"> <tr class="hidden-xs hidden-sm">
<th>{{t keyLabel}}{{#if editing}}{{field-required}}{{/if}}</th> <th class="acc-label">{{t keyLabel}}{{#if editing}}{{field-required}}{{/if}}</th>
<th width="30">&nbsp;</th> <th width="30">&nbsp;</th>
<th>{{t valueLabel}}</th> <th class="acc-label">{{t valueLabel}}</th>
<th width="30">&nbsp;</th> <th width="30">&nbsp;</th>
</tr> </tr>
{{#each ary as |row|}} {{#each ary as |row|}}
<div class="pt-10"></div>
<tr> <tr>
<td data-title="{{t keyLabel}}:"> <td data-title="{{t keyLabel}}:">
{{#if editing}} {{#if editing}}
@ -47,6 +46,7 @@
{{/if}} {{/if}}
</td> </td>
</tr> </tr>
<div class="pb-10"></div>
{{/each}} {{/each}}
</table> </table>
{{else}} {{else}}

View File

@ -1,11 +1,10 @@
{{#if ary.length}} {{#if ary.length}}
<table class="table fixed no-lines mb-10"> <table class="table fixed no-lines mb-10">
<tr class="hidden-xs hidden-sm"> <tr class="hidden-xs hidden-sm">
<th>{{t valueLabel}}</th> <th class="acc-label">{{t valueLabel}}</th>
<th width="30">&nbsp;</th> <th width="30">&nbsp;</th>
</tr> </tr>
{{#each ary as |row|}} {{#each ary as |row|}}
<div class="pt-10"></div>
<tr> <tr>
<td data-title="{{t valueLabel}}"> <td data-title="{{t valueLabel}}">
{{input-paste pasted="pastedValues" class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}} {{input-paste pasted="pastedValues" class="form-control input-sm value" type="text" value=row.value placeholder=valuePlaceholder}}
@ -15,6 +14,7 @@
<button class="btn bg-primary btn-sm" {{action "remove" row}}><i class="icon icon-minus"/><span class="sr-only">{{t 'generic.remove'}}</span></button> <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> </td>
</tr> </tr>
<div class="pb-10"></div>
{{/each}} {{/each}}
</table> </table>
{{/if}} {{/if}}

View File

@ -41,11 +41,9 @@
</div> </div>
</div> </div>
<div class="row inline-form"> <div class="row box ">
<div class="col span-2"> <h4>{{t 'editHost.ips.label'}}</h4>
<label>{{t 'editHost.ips.label'}}</label>
</div>
<div class="col span-8">
{{form-value-array {{form-value-array
initialValues=ips initialValues=ips
changed=(action (mut ips)) changed=(action (mut ips))
@ -53,15 +51,12 @@
valueLabel="editHost.ips.valueLabel" valueLabel="editHost.ips.valueLabel"
valuePlaceholder="editHost.ips.valuePlaceholder" valuePlaceholder="editHost.ips.valuePlaceholder"
}} }}
<p class="text-info">{{t 'editHost.ips.help'}}</p> <p class="help-block">{{t 'editHost.ips.help'}}</p>
</div>
</div> </div>
<div class="row form-group"> <div class="row box mt-30">
<div class="col span-2 form-label form-control-static"> <h4>{{t 'editHost.requireAny.label'}}</h4>
<label>{{t 'editHost.requireAny.label'}}</label>
</div>
<div class="col span-8">
{{form-key-value {{form-key-value
initialStr=requireAny initialStr=requireAny
changedStr=(action (mut requireAny)) changedStr=(action (mut requireAny))
@ -70,7 +65,6 @@
allowEmptyValue=true allowEmptyValue=true
}} }}
<p class="help-block">{{t 'editHost.requireAny.help' htmlSafe=true}}</p> <p class="help-block">{{t 'editHost.requireAny.help' htmlSafe=true}}</p>
</div>
</div> </div>
</section> </section>