ironic-ui/ironic_ui/static/dashboard/admin/ironic/form-field.html
Peter Piela 386b6783cf Add the capability to associate ports with portgroups
The create/edit port elements have been modified to enable
specification of an associated portgroup. The portgroup table in
the node-detail/configuration tab has been modeified to show the
number of ports for each portgroup.

Change-Id: I851b07110bcf85cce8ba1351509d4a8afcc9cd60
2017-07-18 16:51:28 -04:00

57 lines
1.8 KiB
HTML

<div class="form-group"
ng-class="{'has-error': form[field.id].$invalid &&
form[field.id].$dirty}">
<label for="{$ field.id $}"
class="control-label">{$ field.title $}</label>
<span ng-if="field.desc"
class="help-icon"
data-container="body"
data-html="true"
title=""
data-toggle="tooltip"
data-original-title="{$ field.desc $}">
<span class="fa fa-question-circle"></span>
</span>
<span ng-if="field.info"
class="help-icon"
data-container="body"
data-html="true"
title=""
data-toggle="tooltip"
data-original-title="{$ field.info $}">
<span class="fa fa-info-circle"></span>
</span>
<span ng-if="field.required"
class="hz-icon-required fa fa-asterisk"></span>
<div ng-switch="field.type">
<input ng-switch-when="input"
type="text"
class="form-control"
ng-model="field.value"
id="{$ field.id $}"
name="{$ field.id $}"
ng-required="field.required"
ng-disabled="field.disabled"
ng-pattern="field.pattern"
ng-change="{$ field.change $}"
placeholder="{$ field.desc $}"/>
<div ng-switch-when="radio"
class="btn-group"
id="{$ field.id $}">
<label class="btn btn-default"
ng-model="field.value"
ng-repeat="opt in field.options"
ng-disabled="field.disabled"
uib-btn-radio="opt">{$ opt $}</label>
</div>
<div ng-switch-when="select">
<select id="field.id"
class="form-control"
ng-disabled="field.disabled"
ng-options="{$ field.options $}"
ng-model="field.value">
</select>
</div>
</div>
</div>