Files
openmct/platform/forms/res/templates/form.html
Victor Woeltjen 658d485ccc [Forms] Initial minimal functionality
Initial minimal working implementation where a
two-way binding between form and form user is
observable.

Notably, change ng-options to options, since
ng-options is terminal (it breaks mct-control).

WTD-530
2014-11-26 10:43:48 -08:00

42 lines
1.6 KiB
HTML

<form name="{{structure.key}}">
<div class="form">
<span ng-repeat="section in structure.sections">
<div class="section-header" ng-if="section.name">
{{section.name}}
</div>
<div class="form-section">
<div ng-repeat="row in section.rows"
class="form-row validates"
ng-class="{ required: row.required }">
<div class='label'>{{row.name}}</div>
<div class='controls'>
<div class="wrapper" ng-if="row.control">
<mct-control key="row.control"
ng-model="ngModel"
ng-required="row.required"
ng-pattern="row.pattern"
options="row.options"
structure="row"
name="{{row.key}}">
</mct-control>
</div>
<div ng-repeat="item in row.items" class="validates">
<mct-control key="item.control"
ng-model="ngModel"
ng-required="item.required"
ng-pattern="item.pattern"
options="item.options"
structure="item"
name="{{item.key}}">
</mct-control>
</div>
</div>
</div>
</div>
</span>
</div>
</form>