blob: d619fc71b220f9ef5d982adb64e97a91dd1b8dd7 [file] [log] [blame]
<!--
Copyright 2017-present Open Networking Foundation
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.
-->
<form name="vm.{{vm.config.formName || 'form'}}" novalidate>
<!--<div class="form-group" ng-repeat="(name, field) in vm.formField">-->
<!--<xos-field name="name" field="field" ng-model="vm.ngModel[name]"></xos-field>-->
<!--<xos-validation field="vm[vm.config.formName || 'form'][name]" form = "vm[vm.config.formName || 'form']"></xos-validation>-->
<!--<div class="alert alert-info" ng-show="(field.hint).length >0" role="alert">{{field.hint}}</div>-->
<!--</div>-->
<div class="form-group" ng-repeat="field in vm.config.inputs">
<xos-field name="field.name" field="field" ng-model="vm.ngModel[field.name]"></xos-field>
<xos-validation field="vm[vm.config.formName || 'form'][field.name]" form="vm[vm.config.formName || 'form']"></xos-validation>
<p ng-show="(field.hint).length >0" role="alert">{{field.hint}}</p>
</div>
<div class="form-group" ng-if="vm.config.actions">
<xos-alert config="vm.config.feedback" show="vm.config.feedback.show">{{vm.config.feedback.message}}</xos-alert>
<button role="button" href=""
ng-repeat="action in vm.config.actions"
ng-click="action.cb(vm.ngModel, vm[vm.config.formName || 'form'])"
class="btn btn-{{action.class}}"
title="{{action.label}}">
<i class="fa fa-{{action.icon}}"></i>
{{action.label}}
</button>
</div>
<div class="form-group">
Fields marked with <span class="required">*</span> are <span class="required">required</span> fields.
</div>
</form>