Merge "Fix sql injection vulnerability"
[portal.git] / ecomp-portal-FE-common / client / app / views / users / new-user-dialogs / new-user.modal.html
index 5f26152..dc93006 100644 (file)
-<!--\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
+<!--
+  ============LICENSE_START==========================================
+  ONAP Portal
+  ===================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  ===================================================================
+  Unless otherwise specified, all software contained herein is licensed
+  under the Apache License, Version 2.0 (the "License");
+  you may not use this software except in compliance with the License.
+  You may obtain a copy of the License at
+              http://www.apache.org/licenses/LICENSE-2.0
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  Unless otherwise specified, all documentation contained herein is licensed
+  under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+  you may not use this documentation except in compliance with the License.
+  You may obtain a copy of the License at
+              https://creativecommons.org/licenses/by/4.0/
+  Unless required by applicable law or agreed to in writing, documentation
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ============LICENSE_END============================================
+  
+  -->
+<style>
+       .title {
+               border-bottom: none !important;
+       }
+       
+       .b2b-modal-footer .cta-button-group {
+               border-top: 0px solid #d2d2d2;
+       }
+       
+       .multiple-select {
+               width: 250px;
+       }
+</style>
+
+ <div >
+<div ng-if="newUser.dialogState===1">
+
+               <div class="b2b-modal-header">
+                       <h2 class="heading-medium" id="newAdmin">New User</h2>
+                       
+                       <div class="corner-button in">
+                               <button type="button" class="close" aria-label="Close" id="user-button-close" 
+                                       ng-click="$dismiss('cancel')"></button>
+                       </div>
+               </div>
+                               
+                               <fieldset style="height: 75px;" role="radiogroup"
+                                               b2b-radio-group-accessibility aria-labelledby="radiolabel2">
+                                               <div class="form-row" role="radio"
+                                                       ng-repeat="radioObj in ngRepeatDemo">
+                                                       <label style="margin-top: 10px;" for="{{radioObj.id}}"
+                                                               class="radio"> <input type="radio"
+                                                               ng-model="selectedvalueradioButtonGroup.type"
+                                                               id="{{radioObj.id}}"
+                                                               name="nameradioButton" value="{{radioObj.value}}"> <i
+                                                               style= "margin-top: 10px; margin-left: 38px;" class="skin"></i> <span
+                                                               style="margin-top: 10px; margin-left: 70px;">{{radioObj.labelvalue}}</span>
+                                                       </label>
+                                               </div>
+                                       </fieldset>
+                 <div class="systemUser" ng-show="selectedvalueradioButtonGroup.type =='false'" style="color: #5a5a5a;
+        font-family: Omnes-ECOMP-W02, Arial;font-size: 14px;margin-bottom: 8px; padding-left: 30px;">Enter system UserId</div>
+          <div ng-show="selectedvalueradioButtonGroup.type =='false'">
+                               <input id="action-property-input"
+                                       class="adminForm-name-property-input" placeholder="xxxxxx@org.com"
+                                       ng-model="newUser.selectedUser.orgUserId"
+                                       type="text" maxlength="60" style="padding: 20px;
+                  margin-left: 30px; width: 60%;"/>
+                       </div>
+               <div class="b2b-modal-body" tabindex="0" ng-show="selectedvalueradioButtonGroup.type =='true'"
+                       aria-label="Modal header text content" role="region">
+                       <search-users search-title="" selected-user="newUser.selectedUser"></search-users>
+               </div>          
+               <div class="b2b-modal-footer">
+                       <div class="cta-button-group in">
+                               <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"
+                        ng-disabled = "(!newUser.selectedUser && selectedvalueradioButtonGroup.type =='true' ) || (selectedvalueradioButtonGroup.type =='false' && !newUser.selectedUser) ||(newUser.selectedUser && newUser.selectedUser.orgUserId.length <1)">Next
+                       </button>
+                               <button id="search-users-button-cancel"
+                                       class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
+                       </div>
+               </div>
+
+       </div>
+               <div ng-if="newUser.dialogState===3" >
+       
+                       <div class="b2b-modal-header">
+                               <div class="title"
+             ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>
+
+       
+                               <div class="corner-button in">
+                                       <button type="button" class="close" aria-label="Close" id="div-cancel-button"
+                                               ng-click="$dismiss('cancel')"></button>
+                               </div>
+                       </div>
+       
+                       <div class="b2b-modal-body">
+                               <div class="app-roles-main-title">
+                                       <span class="left">Access and roles:</span>
+                               </div>
+                               <br/>
+                               <table  class="app-roles-list">
+                                       <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">
+                                               <td class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</td>
+                                               <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">
+                                                       <multiple-select id="app-roles-{{app.name}}" unique-data="{{$index}}" placeholder="Select roles"
+                                                                               ng-model="app.appRoles" on-change="newUser.appChanged($index)" name-attr="roleName"
+                                                                               value-attr="isApplied"></multiple-select>
+                                               </td>
+                                               <td id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</td>
+                                               <td id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</td>
+                                               <td id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</td>
+                                               <td id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</td>
+                                               <td id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</td>
+                                               <td id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</td>
+                                               <td id="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError" >
+                                                       <i class="icon-misc-trash"></i>
+                                               </td> 
+                                               <td id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></td>
+                                       </tr>
+                               </table >
+                       </div>
+       
+                       <div class="b2b-modal-footer">
+                               <div class="cta-button-group in">
+                                       <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>
+                                       <button id="new-user-back-button" class="btn btn-alt btn-small" ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>
+                                       <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"
+                                                       ng-disabled="(newUser.anyChanges == false)">Save
+                                       </button>
+                                       <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Cancel</button>
+                               </div>
+                       </div>
+       </div>
+
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>