blob: cd4750f568c53ccb4c4e4c4f70967e3616e8319e [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<div id="attribute" class="form-group" ng-repeat="virtualSchema in dynamicForm.virSchemas">
<label for="virtualSchema.key">{{virtualSchema.key}}</label>
<!--all virtual schemas are multivalue-->
<div ng-repeat="field in dynamicForm.virtualAttributeTable[virtualSchema.key].fields track by $index"
ng-model='dynamicForm.virtualAttributeTable[virtualSchema.key].fields[$index]'>
<div class="multivalue">
<button class="btn btn-default btn-sm" type="button" ng-click="addVirtualAttributeField(virtualSchema.key)"
ng-show="!virtualSchema.readonly">
<i class="glyphicon glyphicon-plus" title="Add value"></i>
</button>
<button class="btn btn-default btn-sm minus" ng-if="$index > 0" type="button" ng-show="!virtualSchema.readonly"
ng-click="removeVirtualAttributeField(virtualSchema.key, $index)">
<i class="glyphicon glyphicon-minus" title="Remove value"></i>
</button>
<dynamic-virtual-attribute schema="virtualSchema" user="user" index="$index"></dynamic-virtual-attribute>
</div>
</div>
</div>