Merge "Portal Spring Boot Development"
[portal.git] / ecomp-portal-FE-common / client / app / views / role / popup_createedit_role.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6   ===================================================================
7  
8   Unless otherwise specified, all software contained herein is licensed
9   under the Apache License, Version 2.0 (the "License");
10   you may not use this software except in compliance with the License.
11   You may obtain a copy of the License at
12  
13               http://www.apache.org/licenses/LICENSE-2.0
14  
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
20  
21   Unless otherwise specified, all documentation contained herein is licensed
22   under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23   you may not use this documentation except in compliance with the License.
24   You may obtain a copy of the License at
25  
26               https://creativecommons.org/licenses/by/4.0/
27  
28   Unless required by applicable law or agreed to in writing, documentation
29   distributed under the License is distributed on an "AS IS" BASIS,
30   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31   See the License for the specific language governing permissions and
32   limitations under the License.
33  
34   ============LICENSE_END============================================
35  
36   
37   -->
38   <style>
39   .checkbox .skin {
40     left: 112px;
41     top: -8px;
42 }
43 .checkbox input {
44     margin: 0px;
45     left: 105px;
46     height: 20px;
47     top: -4px;
48     }
49 .checkbox span {
50     display: inline-block;
51     margin-left: 1px;
52     margin-top: 0;
53     position: relative;
54     top: -3px;
55 }
56 .property-label {
57         margin-right: 40px;
58 }
59 .dialog-control {
60     bottom: 170px;
61     position: fixed;
62     right: 588px;
63 }
64 .header-txt{
65         font-size: 30px;
66 }
67   </style>
68                 <div class="b2b-modal-header">  
69                         <div id="title" class="w-ecomp-main-view-title">
70                         <h1 id="role" class="header-txt" >Role</h1>
71                          </div>
72                         <div class="corner-button in">
73                                 <button type="button" class="close" aria-label="Close" id="button-cancel-role"
74                                         ng-click="$dismiss('cancel')"></button>
75                         </div>
76                 </div>
77                 
78                 <div class="b2b-modal-body">
79                             <p class="p-info">Please <span ng-if="roleId != ''">edit</span> <span ng-if="roleId == ''">add</span> the role details below:&nbsp;</p><br>
80                             
81                                <div ng-show ="isGlobalRole" class="property-label checkbox-label"> 
82                                         <label for="checkbox-app-is-restricted" class="checkbox"> 
83                                 <input type="checkbox" ng-model="isGlobalRoleChecked.isChecked" id="checkbox-app-is-restricted"  ng-checked="isGlobalRoleChecked.isChecked" /> 
84                                 <i id="checkbox-app-is-restricted" class="skin"></i> 
85                                 <span>Global Roles: </span> 
86                             </label> 
87                                 </div>
88                              
89                                 <div id="role-text" >
90                                         <label id="role-text-name-label" >*Name:</label>
91                                         <input id="input-name"  class="input-field" maxlength="300"  type="text" data-ng-model="role.name" ng-disabled = "isGlobalRoleChecked.isChecked && appId != 1">                                  
92                                         <br>
93                                         <label id="role-text-priority-label">Priority:</label>
94                                         <input id="input-priority" class="input-field" maxlength="30"  type="text" data-ng-model="role.priority" ng-disabled = "isGlobalRoleChecked.isChecked && appId != 1">                                           
95                                 </div>
96                                 <br/>
97                                 <div class="scrolling-table">
98                                         <div ng-if="roleFunctions.length">
99                                                 <div id="page-title"  class="pageTitle">
100                                                         <label>Role Functions</label>
101                                                 </div>                                  
102                                                 <div b2b-table table-data="availableRoleFunctions" class="b2b-table-div">
103                                                 <span class="ecomp-spinner" ng-show="isLoadingRoleFunctions"></span>
104                                                         <table>
105                                                                 <thead b2b-table-row type="header">
106                                                                         <tr>
107                                                                                 <th b2b-table-header key="firstName" sortable="true" id="col1"></th>
108                                                                                 <th b2b-table-header key="name" sortable="true" id="col2">Name</th>
109                                                                         </tr>
110                                                                 </thead>
111                                                                 <tbody b2b-table-row type="body"
112                                                                         row-repeat="rowData in availableRoleFunctions">
113                                                                         <tr>
114                                                                                 <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1">
115                                                                                         <label class="btn-switch-label" tabindex="0" role="option">
116                                                                                                 <input id="row-input-{{$index}}" type="checkbox" b2b-switches
117                                                                                                 ng-model="rowData.selected"
118                                                                                                 ng-click="toggleRoleFunction(rowData.selected,rowData);">
119                                                                                 </label>
120                                                                                 </td>
121                                                                                 <td b2b-table-body headers="rowheader_t1_{{$index}} col2"
122                                                                                         ng-bind="rowData.name"></td>            
123                                                                         </tr>
124                                                                 </tbody>
125                                                         </table>
126                                                 </div>                                                                          
127                                         </div>
128                         </div>
129          </div>
130          
131          <div class="b2b-modal-footer">
132                 <div class="cta-button-group in">       
133                         <button id="button-app-save" class="btn btn-alt btn-small" size="small" ng-disabled="!(role.name)" ng-click="saveRole(role, editRoleFunction);" href="javascript:void(0)">Save</button>
134                                                 
135                         <button id="button-app-cancel" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')" role="button" tabindex="0" href="javascript:void(0)">Cancel</button>
136                 </div>
137          </div>