874b2b5eba007cf87e3270de1f3e0fe1981fdff7
[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 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 or User ID</div>
44                     <div class="search">
45                         <input id="input-user-search"
46                                autocomplete="off"
47                                type="text"
48                                name="searchString"
49                                placeholder="Search"
50                                ng-model="searchUsers.searchUserString"
51                                ng-keyup="$event.keyCode===13 && searchUsersForm.searchString.$valid && searchUsers.searchUsers()"
52                                pattern="[a-zA-Z0-9-'\s]{1,}"
53                                maxlength="80"
54                                required="true" auto-focus tabindex="0"/>
55                        
56                         <button class="btn btn-alt btn-small" tabindex="2" id="button-search-users"
57                                 ng-class="{disabled: searchUsersForm.searchString.$invalid || searchUsers.searchUsersInProgress}"
58                                 ng-click="searchUsersForm.searchString.$valid && searchUsers.searchUsers()">Search
59                         </button>
60                         
61                         <button class="btn btn-alt btn-small" id="Create-New-User-button" ng-click="searchUsers.showAddUserSection()">
62                                 <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;New 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}}"
78                                      class="user"
79                                      ng-repeat="user in (searchUsers.searchUsersResults | orderBy:['firstName','lastName','orgUserId']) | limitTo: 100 track by $index"
80                                      ng-click="searchUsers.setSelectedUser(user)"
81                                      ng-class="{selected: user.orgUserId === searchUsers.selectedUser.orgUserId}">
82                                     <div id="main-name-{{$index}}" class="main-name">
83                                         <span id="result-first-name-{{$index}}" ng-bind="::user.firstName"></span>
84                                         <span id="result-last-name-{{$index}}"  ng-bind="::user.lastName"></span>
85                                         <span id="result-uuid-{{$index}}" ng-bind="::user.orgUserId"></span></div>
86                                     <div id="job-title-{{$index}}" class="sub-job-title" ng-bind="::user.jobTitle"></div>
87                                     <br/>
88                                 </div>
89                             </div>
90                         </div>
91                     </div>
92                     
93                     <div class="error-text"
94                          id="user-search-error-403"
95                          ng-show="UserSearchsIsNull===true">
96                         No match found.
97                     </div>
98                     
99                     <div id="no-user-found"
100                          class="no-user-found"
101                          ng-show="searchUsers.searchUsersResults && searchUsers.searchUsersResults.length===0 && !searchUsers.searchUsersInProgress">
102                          No users found
103                     </div>
104             </div>
105
106             
107             <div id="addWidget" class="add-user-section" ng-show="searchUsers.showAddUser">
108                                 <div>           
109                                         <div class="input-new-user-div" >
110                                                   <div  class="">*First Name</div>
111                                                   <input  type="text"  ng-model="searchUsers.newUser.firstName"/>                                                           
112                                         </div>
113                                         <div class="input-new-user-div" >
114                                                   <div  class="">Middle Name</div>
115                                                   <input  type="text"  ng-model="searchUsers.newUser.middleName"/>                                                          
116                                         </div>
117                                         <div class="input-new-user-div" >
118                                                   <div class="">*Last Name</div>
119                                                   <input  type="text" ng-model="searchUsers.newUser.lastName"/>
120                                         </div>
121                                         <div class="input-new-user-div" >
122                                                   <div class="">*Email Address ID</div>
123                                                   <input  type="text" ng-model="searchUsers.newUser.emailAddress"/>
124                                         </div>
125                                         <div class="input-new-user-div" >
126                                                   <div class="">*Login ID</div>
127                                                   <input  type="text" ng-model="searchUsers.newUser.loginId"/>
128                                         </div>
129                                         <div class="input-new-user-div" >
130                                                   <div class="">*Login Password</div>
131                                                   <input  type="password" ng-model="searchUsers.newUser.loginPwd"    autocomplete="off"/>
132                                         </div>
133                                         <div class="input-new-user-div" >
134                                                   <div class="">*Confirm Login Password</div>
135                                                   <input  type="password" ng-model="searchUsers.newUser.loginPwdCheck"  autocomplete="off"/>
136                                         </div>
137                                 <div ng-show="searchUsers.newUser.loginPwdCheck.length>=searchUsers.newUser.loginPwd.length&&searchUsers.newUser.loginPwdCheck.length>0&&searchUsers.newUser.loginPwd!=searchUsers.newUser.loginPwdCheck"
138                                                 style="color: #cf2a2a; font-size: 12px;">
139                                                 <small
140                                                         style="position: absolute; margin-top: -6px;">The passwords do not match. Try again.
141                                                 </small>
142                     </div>
143                     <div ng-show="userExist==true"
144                                                 style="color: #cf2a2a; font-size: 12px;">
145                                                 <small
146                                                         style="position: absolute; margin-top: -6px;">User with same loginId already exists. Try again.
147                                                 </small>
148                     </div>
149                                 </div>
150                 <div class="add-new-user-btn">
151                         <button class="btn btn-alt btn-small" ng-click="searchUsers.addNewUserFun()">Add New User</button>
152                                 </div>
153                                 </div>
154                                                                                                                                                 
155
156                     </div>
157             
158         </div>
159
160     </form>
161 </div>