a392f94acaa1442461ffda1d8e1914b0c4660ce8
[portal.git] / ecomp-portal-FE-common / client / app / views / admins / add-admin-dialogs / new-admin.modal.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright © 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   ECOMP is a trademark and service mark of AT&T Intellectual Property.
37   -->
38  <style>
39         .title{
40                 border-bottom: none !important;  
41           }
42           
43         .b2b-modal-footer .cta-button-group {
44      border-top: 0px solid #d2d2d2;
45         }
46         
47 </style>
48
49 <div>
50         <div ng-if="newAdmin.dialogState===1">
51
52                 <div class="b2b-modal-header">
53                         <h2 class="heading-medium" id="newAdmin">New Admin</h2>
54
55                         <div class="corner-button in">
56                                 <button type="button" class="close" aria-label="Close" id="admin-button-cancel" 
57                                         ng-click="$dismiss('cancel')"></button>
58                         </div>
59                 </div>
60
61                 <div class="b2b-modal-body" tabindex="0"
62                         aria-label="Modal header text content" role="region">
63                         <search-users search-title="" selected-user="newAdmin.selectedUser"></search-users>
64                 </div>
65
66                 <div class="b2b-modal-footer">
67                         <div class="cta-button-group in">
68                                 <button id="search-users-button-next" class="btn btn-alt btn-small"
69                                         ng-click="newAdmin.selectedUser && newAdmin.getAdminAppsRoles()"
70                                         ng-class="{disabled: !newAdmin.selectedUser}">Next</button>
71                                 <button id="search-users-button-cancel"
72                                         class="btn btn-alt btn-small" id="div-cancel-button" ng-click="$dismiss('cancel')">Cancel</button>
73                         </div>
74                 </div>
75
76         </div>
77         
78         <div id="div-admin-app-roles" class="app-roles-main" ng-if="newAdmin.dialogState===2">
79                         <div class="b2b-modal-header">
80                                 <div class="title" id="title"
81                                         ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'">
82                                 </div>
83
84                                 <div class="corner-button in">
85                                         <button type="button" class="close" aria-label="Close"
86                                                 ng-click="$dismiss('cancel')"></button>
87                                 </div>
88                         </div>
89
90
91                         <div class="b2b-modal-body">
92                                 <div id="div-app-roles-main-title" class="app-roles-main-title">
93                                         <span class="left">Administrates:</span>
94                                         <!--<span class="right" ng-click="newAdmin.addAdministratedApp()">+Add</span>-->
95                                 </div>
96                                 <div class="adminAppsRoles_dropdown">
97                                         <select id="dropdown1" name="dropdown1" b2b-dropdown
98                                                 placeholder-text="Select application"
99                                                 ng-model="newAdmin.selectedNewApp.value">
100                                                 <option b2b-dropdown-list
101                                                         option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id "
102                                                         ng-disabled="!filteredApps.length" value="{{app}}">{{app.appName}}</option>
103                                         </select>
104                                 </div>
105                                 <br>
106                                 <div class="admin-roles-list">
107                                         <div
108                                                 ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id"
109                                                 ng-show="app.isAdmin">
110                                                 <span id="select-app-{{app.appName.split(' ').join('-')}}"
111                                                         class="administrated-application"
112                                                         ng-bind="app.appName | elipsis: 57"></span> <i
113                                                         id="i-delete-application" class="icon-misc-trash"
114                                                         ng-click="newAdmin.unadminApp(app)"> </i>
115                                         </div>
116                                 </div>
117                         </div>
118                         <br>
119                         <div class="b2b-modal-footer">
120                                 <div class="cta-button-group in">
121
122                                         <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
123                                         <button id="button-back" ng-show="newAdmin.isShowBack"
124                                                 class="btn btn-alt btn-small" ng-click="newAdmin.navigateBack()">Back</button>
125                                         <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small"
126                                                 ng-click="newAdmin.updateAdminAppsRoles()"
127                                                 ng-class="{disabled: false}">Save</button>
128                                         <button id="div-cancel-button" class="btn btn-alt btn-small"
129                                                 ng-click="$dismiss('cancel')">Cancel</button>
130
131                                 </div>
132                         </div>
133         </div>
134
135 </div>
136
137 <script>
138 $(document).ready(function(){
139     $(".ngdialog-close").attr('id','dialog-close');
140 });
141 </script>