2015-05-13 23:42:35 +00:00
|
|
|
<!--
|
|
|
|
Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
|
|
as represented by the Administrator of the National Aeronautics and Space
|
|
|
|
Administration. All rights reserved.
|
|
|
|
|
|
|
|
Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
|
|
"License"); you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
License for the specific language governing permissions and limitations
|
|
|
|
under the License.
|
|
|
|
|
|
|
|
Open MCT Web includes source code licensed under additional open source
|
|
|
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
|
|
this source code distribution or the Licensing information page available
|
|
|
|
at runtime from the About dialog for additional information.
|
|
|
|
-->
|
2016-02-02 23:36:43 +00:00
|
|
|
<form name="mctForm" novalidate class="form">
|
2014-11-26 16:01:00 +00:00
|
|
|
<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>
|
2016-02-03 00:41:48 +00:00
|
|
|
<div class="form-section" ng-class="{ first:$index < 1 }">
|
2014-11-26 21:15:12 +00:00
|
|
|
<ng-form name="mctFormInner" ng-repeat="row in section.rows">
|
2016-02-02 23:36:43 +00:00
|
|
|
<div class="form-row validates l-flex-row"
|
2014-12-03 23:08:41 +00:00
|
|
|
ng-class="{
|
|
|
|
req: row.required,
|
|
|
|
valid: mctFormInner.$dirty && mctFormInner.$valid,
|
2015-03-11 22:09:48 +00:00
|
|
|
invalid: mctFormInner.$dirty && !mctFormInner.$valid,
|
2016-03-10 18:31:05 +00:00
|
|
|
first: $index < 1,
|
|
|
|
'l-controls-first': row.layout === 'control-first',
|
|
|
|
'l-input-sm': row.inputsize === 'sm'
|
2014-12-03 23:08:41 +00:00
|
|
|
}">
|
2016-02-02 23:36:43 +00:00
|
|
|
<div class='label flex-elem' title="{{row.description}}">
|
2014-12-03 23:08:41 +00:00
|
|
|
{{row.name}}
|
2014-11-26 18:43:48 +00:00
|
|
|
</div>
|
2016-02-02 23:36:43 +00:00
|
|
|
<div class='controls flex-elem'>
|
2014-12-03 23:08:41 +00:00
|
|
|
<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
|
|
|
</form>
|