blob: d619fc71b220f9ef5d982adb64e97a91dd1b8dd7 [file] [log] [blame]
Matteo Scandolo500e4c42017-08-08 13:05:24 -07001
2<!--
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
Matteo Scandoloee655a12016-12-19 15:38:43 -080018<form name="vm.{{vm.config.formName || 'form'}}" novalidate>
Matteo Scandolo80c3a652017-01-06 10:48:31 -080019 <!--<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 Scandoloac8c8c22017-01-09 15:04:32 -080026 <xos-validation field="vm[vm.config.formName || 'form'][field.name]" form="vm[vm.config.formName || 'form']"></xos-validation>
Matteo Scandolo6f45e262017-01-09 14:47:26 -080027 <p ng-show="(field.hint).length >0" role="alert">{{field.hint}}</p>
Matteo Scandoloee655a12016-12-19 15:38:43 -080028 </div>
29 <div class="form-group" ng-if="vm.config.actions">
Matteo Scandolo6f45e262017-01-09 14:47:26 -080030 <xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>
Matteo Scandoloee655a12016-12-19 15:38:43 -080031 <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 Scandolo80056232017-07-10 16:24:41 -070040 <div class="form-group">
41 Fields marked with <span class="required">*</span> are <span class="required">required</span> fields.
42 </div>
Matteo Scandolo80c3a652017-01-06 10:48:31 -080043</form>