Add capability for multi-role support
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / Windows / Edit_Roles_Window.html
1 <!--/*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017, 2019 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  <style>
21  @import "bourbon";
22
23 $melon: #F97D75;
24 $black: #2E3641;
25
26 roleul {
27   list-style: none;
28   padding-left: 0;
29   margin-top: 25px;
30 }
31
32 roleli {
33   border: 1px solid black;
34   display: inline-block;
35   padding: 5px 10px;
36   margin-right: 5px;
37   margin-bottom: 5px;
38   text-transform: capitalize;
39 }
40
41 .fa-close {
42   cursor: pointer;
43 }
44
45 [contenteditable] {
46   &:focus, &:active {
47     outline:0;
48   }
49 }
50  </style>
51  
52  
53 <script type="text/ng-template" id="edit_Role_popup.html">
54 <div class="modal" tabindex="-1">
55 <div class="modal-dialog modal-lg">
56     <div class="modal-content">
57         <div class="modal-header">
58             <h2 class="font-showcase-font-name" style="color : #157bb2">{{label}}</h2>
59         </div>
60         <div class="modal-body">
61             <div class="form-group row">
62             <div class="form-group col-sm-6">
63                 <label><sup><b>*</b></sup>Name:</label><br>
64                 <input type="text" class="form-control" ng-readonly="disableCd" ng-model="editRole.loginId.userName" maxlength="256" />
65             </div>
66             </div>
67             <div class="form-group row">
68             <div class="form-group col-sm-6" >
69                 <label><sup><b>*</b></sup>Role:</label><br>
70                 <input type="text" class="form-control" ng-readonly="true" ng-model="editRole.role" maxlength="30" />
71             </div>
72             </div>
73             <div class="form-group row">
74             <div class="form-group col-sm-12" >
75                 <label><sup><b>*</b></sup>Assigned Scopes:</label><br>
76                 <roleul>
77                     <roleli ng-model="editRole.scope" ng-repeat="option in activeScopes" class="{'fadeOut' : option}">
78                           <span class="fa fa-close" ng-click="deleteScope($index)"></span>
79                           <span>{{option}}</span>
80                     </roleli>
81                   </roleul>
82             </div>
83             </div>
84             <div class="form-group row">
85             <div class="form-group col-sm-12" >
86                 <label><sup><b>*</b></sup>Scope: To Multi Select Scopes press ctrl (Windows) and cmd (Mac) and then select.</label><br>
87                 <input type="text" class="form-control" ng-model="searchKey" placeholder="Filter Scopes.." title="Enter Scope name."><br>
88                 <select class="form-control" multiple style="height: 400px;" ng-model="editRole.scopeList" ng-options="option for option in scopeDatas | filter: searchKey" title="Select the Scopes from the dropdown."></select>
89             </div>
90             </div>
91             <div class="form-group row">
92             <div class="form-group col-sm-12" >
93                 <button class="btn btn-primary" ng-click="addScope(editRole.scopeList);" title="On Click Scopes added to Active Scope List">Add Scopes</button>
94             </div>
95             </div>
96         </div>
97         <div class="modal-footer">
98             <button class="btn btn-success" herf="javascript:void(0)" ng-click="saveRole(editRole);" title="OnClick Policy Role is saved.">Save</button>
99             <button class="btn btn-default" herf="javascript:void(0)" ng-click="$close()" title="OnClick Policy Role Window is closed.">Close</button>
100         </div>
101     </div>
102 </div>
103 </div>
104 </script>