Matteo Scandolo | 500e4c4 | 2017-08-08 13:05:24 -0700 | [diff] [blame] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 18 | <form name="vm.{{vm.config.formName || 'form'}}" novalidate> |
Matteo Scandolo | 80c3a65 | 2017-01-06 10:48:31 -0800 | [diff] [blame] | 19 | <!--<div class="form-group" ng-repeat="(name, field) in vm.formField">--> |
| 20 | <!--<xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>--> |
| 21 | <!--<xos-validation field="vm[vm.config.formName || 'form'][name]" form = "vm[vm.config.formName || 'form']"></xos-validation>--> |
| 22 | <!--<div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>--> |
| 23 | <!--</div>--> |
| 24 | <div class="form-group" ng-repeat="field in vm.config.inputs"> |
| 25 | <xos-field name="field.name" field="field" ng-model="vm.ngModel[field.name]"></xos-field> |
Matteo Scandolo | ac8c8c2 | 2017-01-09 15:04:32 -0800 | [diff] [blame] | 26 | <xos-validation field="vm[vm.config.formName || 'form'][field.name]" form="vm[vm.config.formName || 'form']"></xos-validation> |
Matteo Scandolo | 6f45e26 | 2017-01-09 14:47:26 -0800 | [diff] [blame] | 27 | <p ng-show="(field.hint).length >0" role="alert">{{field.hint}}</p> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 28 | </div> |
| 29 | <div class="form-group" ng-if="vm.config.actions"> |
Matteo Scandolo | 6f45e26 | 2017-01-09 14:47:26 -0800 | [diff] [blame] | 30 | <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame] | 31 | <button role="button" href="" |
| 32 | ng-repeat="action in vm.config.actions" |
| 33 | ng-click="action.cb(vm.ngModel, vm[vm.config.formName || 'form'])" |
| 34 | class="btn btn-{{action.class}}" |
| 35 | title="{{action.label}}"> |
| 36 | <i class="fa fa-{{action.icon}}"></i> |
| 37 | {{action.label}} |
| 38 | </button> |
| 39 | </div> |
Matteo Scandolo | 8005623 | 2017-07-10 16:24:41 -0700 | [diff] [blame] | 40 | <div class="form-group"> |
| 41 | Fields marked with <span class="required">*</span> are <span class="required">required</span> fields. |
| 42 | </div> |
Matteo Scandolo | 80c3a65 | 2017-01-06 10:48:31 -0800 | [diff] [blame] | 43 | </form> |