88 lines
3.1 KiB
HTML
88 lines
3.1 KiB
HTML
<div class="modal-header" modal-draggable>
|
|
<button type="button"
|
|
class="close"
|
|
ng-click="$dismiss()"
|
|
aria-hidden="true"
|
|
aria-label="Close">
|
|
<span aria-hidden="true" class="fa fa-times"></span>
|
|
</button>
|
|
<h3 class="modal-title">{$ ::ctrl.modalTitle $}</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form id="CreatePortForm" name="CreatePortForm">
|
|
<form-field field="ctrl.address" form="CreatePortForm"></form-field>
|
|
<form-field field="ctrl.pxeEnabled" form="CreatePortForm"></form-field>
|
|
<form-field field="ctrl.portgroup_uuid" form="CreatePortForm"></form-field>
|
|
</form>
|
|
|
|
<form id="LocalLinkConnectionForm"
|
|
name="LocalLinkConnectionForm"
|
|
class="well well-sm">
|
|
<h4 translate>Local link connection</h4>
|
|
<div class="form-group"
|
|
ng-repeat="(propertyName, propertyField) in
|
|
ctrl.localLinkConnection.fields">
|
|
<form-field field="propertyField" form="LocalLinkConnectionForm"></form-field>
|
|
</div>
|
|
</form>
|
|
|
|
<form id="AddExtraForm" name="AddExtraForm" style="margin-bottom:10px;">
|
|
<label for="extras" class="control-label" translate>Extras</label>
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-addon"
|
|
style="width:25%;text-align:right">
|
|
Add Extra:</span>
|
|
<input class="form-control"
|
|
type="text"
|
|
ng-model="extraName"
|
|
validate-unique="ctrl.checkExtraUnique"
|
|
placeholder="{$ ::'Property Name' | translate $}"/>
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-primary"
|
|
type="button"
|
|
ng-disabled="!extraName || AddExtraForm.$invalid"
|
|
ng-click="ctrl.port.extra[extraName] = null;
|
|
extraName = null">
|
|
<span class="fa fa-plus"> </span>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
</form>
|
|
|
|
<form class="form-horizontal" id="ExtraForm" name="ExtraForm">
|
|
<div class="input-group input-group-sm"
|
|
ng-repeat="(propertyName, propertyValue) in ctrl.port.extra">
|
|
<span class="input-group-addon"
|
|
style="width:25%;text-align:right">
|
|
{$ propertyName $}
|
|
</span>
|
|
<input class="form-control"
|
|
type="text"
|
|
name="{$ propertyName $}"
|
|
ng-model="ctrl.port.extra[propertyName]"
|
|
ng-required="true"/>
|
|
<div class="input-group-btn">
|
|
<a class="btn btn-default"
|
|
ng-click="ctrl.deleteExtra(propertyName)">
|
|
<span class="fa fa-minus"> </span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<!--modal footer-->
|
|
<div class="modal-footer ng-scope">
|
|
<button class="btn btn-default" ng-click="ctrl.cancel()">
|
|
<span class="fa fa-close"></span>
|
|
<span class="ng-scope" translate>Cancel</span>
|
|
</button>
|
|
<button type="submit"
|
|
ng-disabled="CreatePortForm.$invalid ||
|
|
LocalLinkConnectionForm.$invalid ||
|
|
ExtraForm.$invalid"
|
|
ng-click="ctrl.submit()"
|
|
class="btn btn-primary">
|
|
{$ ::ctrl.submitButtonTitle $}
|
|
</button>
|
|
</div>
|