[POLICY-73] replace openecomp for policy-engine
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / Windows / Dictionary / AttributeDictionary.html
1 <!--/*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */-->
20 <script type="text/ng-template" id="add_Attribute_popup.html">
21 <div class="modal" tabindex="-1">
22                  <div class="modal-dialog modal-lg">
23                         <div class="modal-content">
24         <div class="modal-header ng-scope in">
25                 <h2 class="font-showcase-font-name" style="color: #157bb2">{{label}}</h2>
26         </div>
27         <form name="formdata" ng-submit="saveAttributeName(editAttributeName);" novalidate>
28         <div class="modal-body ng-scope ng-isolate-scope in">
29                 <div class="form-group row">
30                         <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.xacmlId.$invalid && !formdata.xacmlId.$pristine }">
31                                 <label>Attribute Name:<sup><b>*</b></sup></label><br> 
32                                 <input class="form-control" type="text" ng-model="editAttributeName.xacmlId" name="xacmlId" required />
33                                         <p ng-show="formdata.xacmlId.$invalid && !formdata.xacmlId.$pristine" class="help-block">Attribute Name is required.</p>
34                         </div>
35                         <div class="form-group col-sm-2" ng-class="{ 'has-error' : formdata.datatypeBean.shortName.$invalid && !formdata.datatypeBean.shortName.$pristine }">
36                                 <label>Data Type:<sup><b>*</b></sup></label><BR> 
37                                 <select class="form-control" ng-model="editAttributeName.datatypeBean.shortName" name="datatypeBean.shortName" required>
38                                         <option>string</option>
39                                         <option>integer</option>
40                                         <option>boolean</option>
41                                         <option>double</option>
42                                         <option>user</option>
43                                 </select>
44                                 <p ng-show="formdata.datatypeBean.shortName.$invalid && !formdata.datatypeBean.shortName.$pristine" class="help-block">Data Type is required.</p>
45                         </div>
46                 </div>
47                 <div class="form-group row">
48                         <div class="form-group col-sm-6">
49                                 <label>Description:</label><br> 
50                                 <input type="text" ng-model="editAttributeName.description" class="form-control" />
51                         </div>
52                         <div class="form-group col-sm-2">
53                                 <label>Priority:</label><BR>
54                                 <select class="form-control" ng-model="editAttributeName.priority">
55                                         <option></option>
56                                         <option>High</option>
57                                 </select>
58                         </div>
59                 </div>
60                 <div class="form-group row">
61                         <div class="form-group col-sm-4">
62                                         <label>  Attribute Values:</label><br>
63                                         <button type="button" class="btn btn-secondary btn-small" ng-click="addNewChoice()"><i class="fa fa-plus"></i></button>
64                         </div>
65                 </div>
66                 <div class="form-group">
67                                 <div data-ng-repeat="choice in attributes">
68                                         <div class="form-group row">
69                                                 <div class="form-group col-sm-5" ng-class="{ 'has-error' : formdata.attributeValues.$invalid && !formdata.attributeValues.$pristine }">
70                                                         <input type="text" class="form-control" ng-model="choice.attributeValues" maxlength="30" name="attributeValues" required />
71                                                         <p ng-show="formdata.attributeValues.$invalid && !formdata.attributeValues.$pristine" class="help-block">Attribute Value is required.</p>
72                                                 </div>
73                                                 <div class="form-group col-sm-1">
74                                                         <button type="button" class="btn btn-secondary btn-small" ng-show="$last" ng-click="removeChoice()"><i class="fa fa-minus"></i></button>
75                                                 </div>
76                                         </div>
77                                 </div>
78                 </div>
79         </div>
80         <div class="modal-footer">
81                 <button class="btn btn-success" type="submit" ng-disabled="formdata.$invalid">Save</button>
82                 <button type="button" class="btn btn-default"  ng-click="$dismiss('cancel')">Close</button>
83         </div>
84         </form>
85 </div>
86 </div>
87 </div>
88 </div>
89 </div>
90 </script>