search user changes
[portal.git] / ecomp-portal-FE-os / client / src / directives / search-users / search-users.tpl.html
1 <!--
2   ============LICENSE_START==========================================
3   ONAP Portal
4   ===================================================================
5   Copyright (C) 2017-2018 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 <div class="search-users-directive">
39         <form name="searchUsersForm" novalidate method="post">
40                 <div class="title" ng-bind="searchUsers.searchTitle"></div>
41                 <div class="main">
42                         <div ng-show="searchUsers.showSearch">
43                                 <div class="search-instructions">Enter first name, last name
44                                         or User ID</div>
45                                 <div class="search">
46                                         <input id="input-user-search" autocomplete="off" type="text"
47                                                 name="searchString" placeholder="Search"
48                                                 ng-model="searchUsers.searchUserString"
49                                                 ng-keyup="$event.keyCode===13 && searchUsersForm.searchString.$valid && searchUsers.searchUsers()"
50                                                 pattern="[a-zA-Z0-9-_'\s]{1,}" maxlength="80" required="true"
51                                                 auto-focus tabindex="0" />
52
53                                         <button class="btn btn-alt btn-small" tabindex="2"
54                                                 id="button-search-users"
55                                                 ng-class="{disabled: searchUsersForm.searchString.$invalid || searchUsers.searchUsersInProgress}"
56                                                 ng-click="searchUsersForm.searchString.$valid && searchUsers.searchUsers()">Search
57                                         </button>
58
59                                         <button class="btn btn-alt btn-small" id="Create-New-User-button"
60                                                 ng-click="searchUsers.showAddUserSection()">
61                                                 <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;New
62                                                 User
63                                         </button>
64
65                                 </div>
66
67                                 <span class="ecomp-spinner" ng-show="searchUsers.isLoading"></span>
68                                 <div ng-show="UserSearchsIsNull===false">
69                                         <div class="search-results"
70                                                 ng-show="!searchUsers.isLoading
71                              && searchUsers.searchUsersResults
72                              && searchUsers.searchUsersResults.length">
73                                                 <div id="search-results" ng-show="UserSearchsIsNull===false"
74                                                         class="results-title"
75                                                         ng-bind="'Showing ' + searchUsers.searchUsersResults.length + ' results'"></div>
76                                                 <div class="results-container" scroll-top="searchUsers.scrollApi">
77                                                         <div id="search-result-{{$index}}" class="user"
78                                                                 ng-repeat="user in (searchUsers.searchUsersResults | orderBy:['firstName','lastName','orgUserId']) | limitTo: 100 track by $index"
79                                                                 ng-click="searchUsers.setSelectedUser(user)"
80                                                                 ng-class="{selected: user.orgUserId === searchUsers.selectedUser.orgUserId}">
81                                                                 <div id="main-name-{{$index}}" class="main-name">
82                                                                         <span id="result-first-name-{{$index}}"
83                                                                                 ng-bind="::user.firstName"></span> <span
84                                                                                 id="result-last-name-{{$index}}" ng-bind="::user.lastName"></span>
85                                                                         <span id="result-uuid-{{$index}}" ng-bind="::user.orgUserId"></span>
86                                                                 </div>
87                                                                 <div id="job-title-{{$index}}" class="sub-job-title"
88                                                                         ng-bind="::user.jobTitle"></div>
89                                                                 <br />
90                                                         </div>
91                                                 </div>
92                                         </div>
93                                 </div>
94
95                                 <div class="error-text" id="user-search-error-403"
96                                         ng-show="UserSearchsIsNull===true">No match found.</div>
97
98                                 <div id="no-user-found" class="no-user-found"
99                                         ng-show="searchUsers.searchUsersResults && searchUsers.searchUsersResults.length===0 && !searchUsers.searchUsersInProgress">
100                                         No users found</div>
101                         </div>
102
103
104                         <div id="addWidget" class="add-user-section"
105                                 ng-show="searchUsers.showAddUser">
106                                 <div>
107                                         <div class="input-new-user-div">
108                                                 <div class="">*First Name</div>
109                                                 <input type="text" ng-model="searchUsers.newUser.firstName" />
110                                         </div>
111                                         <div class="input-new-user-div">
112                                                 <div class="">Middle Name</div>
113                                                 <input type="text" ng-model="searchUsers.newUser.middleName" />
114                                         </div>
115                                         <div class="input-new-user-div">
116                                                 <div class="">*Last Name</div>
117                                                 <input type="text" ng-model="searchUsers.newUser.lastName" />
118                                         </div>
119                                         <div class="input-new-user-div">
120                                                 <div class="">*Email Address ID</div>
121                                                 <input type="text" ng-model="searchUsers.newUser.emailAddress" />
122                                         </div>
123                                         <div class="input-new-user-div">
124                                                 <div class="">*Login ID</div>
125                                                 <input type="text" ng-model="searchUsers.newUser.loginId" />
126                                         </div>
127                                         <div class="input-new-user-div">
128                                                 <div class="">*Login Password</div>
129                                                 <input type="password" ng-model="searchUsers.newUser.loginPwd"
130                                                         autocomplete="off" />
131                                         </div>
132                                         <div class="input-new-user-div">
133                                                 <div class="">*Confirm Login Password</div>
134                                                 <input type="password"
135                                                         ng-model="searchUsers.newUser.loginPwdCheck" autocomplete="off" />
136                                         </div>
137                                         <div
138                                                 ng-show="searchUsers.newUser.loginPwdCheck.length>=searchUsers.newUser.loginPwd.length&&searchUsers.newUser.loginPwdCheck.length>0&&searchUsers.newUser.loginPwd!=searchUsers.newUser.loginPwdCheck"
139                                                 style="color: #cf2a2a; font-size: 12px;">
140                                                 <small style="position: absolute; margin-top: -6px;">The
141                                                         passwords do not match. Try again. </small>
142                                         </div>
143                                         <div ng-show="userExist==true"
144                                                 style="color: #cf2a2a; font-size: 12px;">
145                                                 <small style="position: absolute; margin-top: -6px;">User
146                                                         with same loginId already exists. Try again. </small>
147                                         </div>
148                                         <div class="search-instructions">
149                                                 <strong style="color: red">Note:</strong> Login ID should not
150                                                 contain special characters except '@', '-', and '_'.
151                                         </div>
152                                 </div>
153                                 <div class="add-new-user-btn">
154                                         <button class="btn btn-alt btn-small"
155                                                 ng-click="searchUsers.addNewUserFun()">Add New User</button>
156                                 </div>
157                         </div>
158
159
160                 </div>
161 </div>
162
163 </form>
164 </div>