openmct/platform/forms/res/templates/controls/composite.html
Victor Woeltjen 218f732dc2 [Forms] Add CompositeController
Add a controller for composite controls; this is used
to flag contained controls as required when they have
been partially filled in (to treat entering one of two
such fields as invalid.) WTD-593.
2014-12-03 16:07:46 -08:00

15 lines
602 B
HTML

<span ng-controller="CompositeController as compositeCtrl">
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
<mct-control key="item.control"
ng-model="ngModel[field]"
ng-required="ngRequired || compositeCtrl.isNonEmpty(ngModel[field])"
ng-pattern="ngPattern"
options="item.options"
structure="row"
field="$index">
</mct-control>
<span class="composite-control-label">
{{item.name}}
</span>
</ng-form>
</span>