[PORTAL-7] Rebase
[portal.git] / ecomp-portal-FE-common / client / app / views / users / new-user-dialogs / new-user.modal.html
diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.modal.html b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.modal.html
new file mode 100644 (file)
index 0000000..5f26152
--- /dev/null
@@ -0,0 +1,84 @@
+<!--\r
+  ================================================================================\r
+  ECOMP Portal\r
+  ================================================================================\r
+  Copyright (C) 2017 AT&T Intellectual Property\r
+  ================================================================================\r
+  Licensed under the Apache License, Version 2.0 (the "License");\r
+  you may not use this file except in compliance with the License.\r
+  You may obtain a copy of the License at\r
+  \r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+  \r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+  ================================================================================\r
+  -->\r
+<div class="new-user-modal">\r
+\r
+    <div class="search-users" ng-show="newUser.dialogState===1">\r
+\r
+        <search-users search-title="New User"\r
+                      selected-user="newUser.selectedUser"></search-users>\r
+\r
+        <div class="dialog-control">   \r
+            <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"\r
+                 ng-class="{disabled: !newUser.selectedUser}">Next\r
+            </button>\r
+             <button class="btn btn-alt btn-small" id="cancel-button" ng-click="closeThisDialog()">Cancel</button>\r
+            \r
+        </div>\r
+    </div>\r
+\r
+    <div class="user-apps-roles" ng-show="newUser.dialogState===3">\r
+        <div class="title"\r
+             ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>\r
+\r
+\r
+        <div class="app-roles-main">\r
+            <div class="app-roles-main-title">\r
+                <span class="left">Access and roles:</span>\r
+            </div>\r
+\r
+            <div class="app-roles-list">\r
+                <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
+                    <div class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</div>\r
+                    <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
+                        <multiple-select id="app-roles"\r
+                                         unique-data="{{$index}}"\r
+                                         placeholder="Select roles"\r
+                                         ng-model="app.appRoles"\r
+                                         on-change="newUser.appChanged($index)"\r
+                                         name-attr="roleName"\r
+                                         value-attr="isApplied"></multiple-select>\r
+                    </div>\r
+                    <div id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</div>\r
+                    <div id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</div>\r
+                    <div id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</div>\r
+                    <div id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</div>\r
+                    <div id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</div>\r
+                    <div id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</div>\r
+                    <div id="app-item-delete" class="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError"></div>\r
+                    <div id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></div>\r
+                </div>\r
+            </div>\r
+            \r
+             <div class="dialog-control">\r
+                <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>\r
+                <button id="new-user-back-button" class="btn btn-alt btn-small"  ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>\r
+                <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"\r
+                      ng-disabled="(newUser.anyChanges == false)">Save\r
+                </button>\r
+                <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>\r
+            </div>\r
+\r
+        </div>\r
+\r
+    </div>\r
+\r
+\r
+\r
+</div>\r