[PORTAL-7] Rebase
[portal.git] / ecomp-portal-FE-common / client / app / views / users / new-user-dialogs / new-user.modal.html
1 <!--\r
2   ================================================================================\r
3   ECOMP Portal\r
4   ================================================================================\r
5   Copyright (C) 2017 AT&T Intellectual Property\r
6   ================================================================================\r
7   Licensed under the Apache License, Version 2.0 (the "License");\r
8   you may not use this file except in compliance with the License.\r
9   You may obtain a copy of the License at\r
10   \r
11        http://www.apache.org/licenses/LICENSE-2.0\r
12   \r
13   Unless required by applicable law or agreed to in writing, software\r
14   distributed under the License is distributed on an "AS IS" BASIS,\r
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16   See the License for the specific language governing permissions and\r
17   limitations under the License.\r
18   ================================================================================\r
19   -->\r
20 <div class="new-user-modal">\r
21 \r
22     <div class="search-users" ng-show="newUser.dialogState===1">\r
23 \r
24         <search-users search-title="New User"\r
25                       selected-user="newUser.selectedUser"></search-users>\r
26 \r
27         <div class="dialog-control">   \r
28             <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"\r
29                  ng-class="{disabled: !newUser.selectedUser}">Next\r
30             </button>\r
31              <button class="btn btn-alt btn-small" id="cancel-button" ng-click="closeThisDialog()">Cancel</button>\r
32             \r
33         </div>\r
34     </div>\r
35 \r
36     <div class="user-apps-roles" ng-show="newUser.dialogState===3">\r
37         <div class="title"\r
38              ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>\r
39 \r
40 \r
41         <div class="app-roles-main">\r
42             <div class="app-roles-main-title">\r
43                 <span class="left">Access and roles:</span>\r
44             </div>\r
45 \r
46             <div class="app-roles-list">\r
47                 <div class="app-item" ng-repeat="app in (newUser.adminApps) track by app.id"  id="app-name-{{app.name.split(' ').join('-')}}" ng-show="!app.isDeleted">\r
48                     <div class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</div>\r
49                     <div 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">\r
50                         <multiple-select id="app-roles"\r
51                                          unique-data="{{$index}}"\r
52                                          placeholder="Select roles"\r
53                                          ng-model="app.appRoles"\r
54                                          on-change="newUser.appChanged($index)"\r
55                                          name-attr="roleName"\r
56                                          value-attr="isApplied"></multiple-select>\r
57                     </div>\r
58                     <div id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</div>\r
59                     <div id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</div>\r
60                     <div id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</div>\r
61                     <div id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</div>\r
62                     <div id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</div>\r
63                     <div id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</div>\r
64                     <div id="app-item-delete" class="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError"></div>\r
65                     <div id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></div>\r
66                 </div>\r
67             </div>\r
68             \r
69              <div class="dialog-control">\r
70                 <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>\r
71                 <button id="new-user-back-button" class="btn btn-alt btn-small"  ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>\r
72                 <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"\r
73                       ng-disabled="(newUser.anyChanges == false)">Save\r
74                 </button>\r
75                 <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>\r
76             </div>\r
77 \r
78         </div>\r
79 \r
80     </div>\r
81 \r
82 \r
83 \r
84 </div>\r