Portal Spring Boot Development
[portal.git] / ecomp-portal-FE-common / client / app / views / users / new-user-dialogs / new-user.modal.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         .title {
40                 border-bottom: none !important;
41         }
42         
43         .b2b-modal-footer .cta-button-group {
44                 border-top: 0px solid #d2d2d2;
45         }
46         
47         .multiple-select {
48                 width: 250px;
49         }
50 </style>
51
52  <div >
53  
54 <div ng-if="newUser.dialogState===1">
55
56                 <div class="b2b-modal-header">
57                         <h2 class="heading-medium" id="newAdmin">New User</h2>
58                         
59                         <div class="corner-button in">
60                                 <button type="button" class="close" aria-label="Close" id="user-button-close" 
61                                         ng-click="$dismiss('cancel')"></button>
62                         </div>
63                 </div>
64                                 
65                                 <fieldset style="height: 75px;" role="radiogroup"
66                                                 b2b-radio-group-accessibility aria-labelledby="radiolabel2">
67                                                 <div class="form-row" role="radio"
68                                                         ng-repeat="radioObj in ngRepeatDemo">
69                                                         <label style="margin-top: 10px;" for="{{radioObj.id}}"
70                                                                 class="radio"> <input type="radio"
71                                                                 ng-model="selectedvalueradioButtonGroup.type"
72                                                                 id="{{radioObj.id}}"
73                                                                 name="nameradioButton" value="{{radioObj.value}}"> <i
74                                                                 style= "margin-top: 10px; margin-left: 38px;" class="skin"></i> <span
75                                                                 style="margin-top: 10px; margin-left: 70px;">{{radioObj.labelvalue}}</span>
76                                                         </label>
77                                                 </div>
78                                         </fieldset>
79                   <div class="systemUser" ng-show="selectedvalueradioButtonGroup.type =='false'" style="color: #5a5a5a;
80         font-family: Omnes-ECOMP-W02, Arial;font-size: 14px;margin-bottom: 8px; padding-left: 30px;">Enter system UserId</div>
81           <div ng-show="selectedvalueradioButtonGroup.type =='false'">
82                                 <input id="action-property-input"
83                                         class="adminForm-name-property-input" placeholder="xxxxxx@org.com"
84                                         ng-model="newUser.selectedUser.orgUserId"
85                                         type="text" maxlength="60" style="padding: 20px;
86                   margin-left: 30px; width: 60%;"/>
87                         </div>
88                 <div class="b2b-modal-body" tabindex="0" ng-show="selectedvalueradioButtonGroup.type =='true'"
89                         aria-label="Modal header text content" role="region">
90                         <search-users search-title="" selected-user="newUser.selectedUser"></search-users>
91                 </div>          
92                 <div class="b2b-modal-footer">
93                         <div class="cta-button-group in">
94                                 <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"
95                          ng-disabled = "(!newUser.selectedUser && selectedvalueradioButtonGroup.type =='true' ) || (selectedvalueradioButtonGroup.type =='false' && !newUser.selectedUser) ||(newUser.selectedUser && newUser.selectedUser.orgUserId.length <1)">Next
96                         </button>
97                                 <button id="search-users-button-cancel"
98                                         class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
99                         </div>
100                 </div>
101
102         </div>
103                 <div ng-if="newUser.dialogState===3" >
104         
105                         <div class="b2b-modal-header">
106                                 <div class="title"
107              ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>
108
109         
110                                 <div class="corner-button in">
111                                         <button type="button" class="close" aria-label="Close" id="div-cancel-button"
112                                                 ng-click="$dismiss('cancel')"></button>
113                                 </div>
114                         </div>
115         
116                         <div class="b2b-modal-body">
117                                 <div class="app-roles-main-title">
118                                         <span class="left">Access and roles:</span>
119                                 </div>
120                                 <br/>
121                                 <table  class="app-roles-list">
122                                         <tr class="app-item" ng-repeat="app in (newUser.adminApps) track by app.id" id="app-name-{{app.name.split(' ').join('-')}}" ng-show="!app.isDeleted">
123                                                 <td class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</td>
124                                                 <td class="app-item-right" id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}" ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating">
125                                                         <multiple-select id="app-roles-{{app.name}}" unique-data="{{$index}}" placeholder="Select roles"
126                                                                                 ng-model="app.appRoles" on-change="newUser.appChanged($index)" name-attr="roleName"
127                                                                                 value-attr="isApplied"></multiple-select>
128                                                 </td>
129                                                 <td id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</td>
130                                                 <td id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</td>
131                                                 <td id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</td>
132                                                 <td id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</td>
133                                                 <td id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</td>
134                                                 <td id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</td>
135                                                 <td id="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError" >
136                                                         <i class="icon-misc-trash"></i>
137                                                 </td> 
138                                                 <td id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></td>
139                                         </tr>
140                                 </table >
141                         </div>
142         
143                         <div class="b2b-modal-footer">
144                                 <div class="cta-button-group in">
145                                         <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>
146                                         <button id="new-user-back-button" class="btn btn-alt btn-small" ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>
147                                         <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"
148                                                         ng-disabled="(newUser.anyChanges == false)">Save
149                                         </button>
150                                         <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
151                                 </div>
152                         </div>
153         </div>
154
155 </div>
156
157 <script>
158 $(document).ready(function(){
159     $(".ngdialog-close").attr('id','dialog-close');
160 });
161 </script>