2014-11-26 20:50:51 +00:00
|
|
|
<form name="mctForm" novalidate>
|
2014-11-26 18:43:48 +00:00
|
|
|
|
2014-11-26 16:01:00 +00:00
|
|
|
<div class="form">
|
|
|
|
<span ng-repeat="section in structure.sections">
|
2014-11-26 18:43:48 +00:00
|
|
|
<div class="section-header" ng-if="section.name">
|
|
|
|
{{section.name}}
|
|
|
|
</div>
|
2014-11-26 16:01:00 +00:00
|
|
|
<div class="form-section">
|
2014-11-26 21:15:12 +00:00
|
|
|
<ng-form name="mctFormInner" ng-repeat="row in section.rows">
|
2014-12-03 23:08:41 +00:00
|
|
|
<div class="form-row validates"
|
|
|
|
ng-class="{
|
|
|
|
req: row.required,
|
|
|
|
valid: mctFormInner.$dirty && mctFormInner.$valid,
|
|
|
|
invalid: mctFormInner.$dirty && !mctFormInner.$valid
|
|
|
|
}">
|
2014-11-26 18:43:48 +00:00
|
|
|
|
2014-12-03 23:08:41 +00:00
|
|
|
<div class='label' title="{{row.description}}">
|
|
|
|
{{row.name}}
|
|
|
|
<span ng-if="row.description"
|
|
|
|
class="ui-symbol">
|
|
|
|
i
|
|
|
|
</span>
|
2014-11-26 18:43:48 +00:00
|
|
|
</div>
|
2014-12-03 23:08:41 +00:00
|
|
|
<div class='controls'>
|
|
|
|
<div class="wrapper" ng-if="row.control">
|
|
|
|
<mct-control key="row.control"
|
2014-11-26 21:08:57 +00:00
|
|
|
ng-model="ngModel"
|
2014-12-03 23:08:41 +00:00
|
|
|
ng-required="row.required"
|
|
|
|
ng-pattern="getRegExp(row.pattern)"
|
|
|
|
options="row.options"
|
2014-11-28 22:08:33 +00:00
|
|
|
structure="row"
|
2014-12-03 23:08:41 +00:00
|
|
|
field="row.key">
|
2014-11-26 21:08:57 +00:00
|
|
|
</mct-control>
|
2014-12-03 23:08:41 +00:00
|
|
|
</div>
|
2014-11-26 16:01:00 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-11-26 21:15:12 +00:00
|
|
|
</ng-form>
|
2014-11-26 16:01:00 +00:00
|
|
|
</div>
|
|
|
|
</span>
|
2014-11-26 18:43:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|