summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-os/client/src/directives/search-users/search-users.tpl.html
blob: 5ac0cb9a3ae0254b0a1f33a6d64eb44f16830a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!--
  ================================================================================
  eCOMP Portal
  ================================================================================
  Copyright (C) 2017 AT&T Intellectual Property
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file 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.
  ================================================================================
  -->
<div class="search-users-directive">
    <form name="searchUsersForm" novalidate>
        <div class="title" ng-bind="searchUsers.searchTitle"></div>
        <div class="main">
           <div ng-show="searchUsers.showSearch">
	            <div class="search-instructions">Enter first name, last name or User ID</div>
	            <div class="search">
	                <input id="input-user-search"
	                       autocomplete="off"
	                       type="text"
	                       name="searchString"
	                       placeholder="Search"
	                       ng-model="searchUsers.searchUserString"
	                       ng-keyup="$event.keyCode===13 && searchUsersForm.searchString.$valid && searchUsers.searchUsers()"
	                       pattern="[a-zA-Z0-9-'\s]{1,}"
	                       maxlength="80"
	                       required="true" auto-focus tabindex="0"/>
	               
	               	<button class="btn btn-alt btn-small" tabindex="2" id="button-search-users"
	               		ng-class="{disabled: searchUsersForm.searchString.$invalid || searchUsers.searchUsersInProgress}"
	                	ng-click="searchUsersForm.searchString.$valid && searchUsers.searchUsers()">Search
	                </button>
	                
	                <button class="btn btn-alt btn-small" id="Create-New-User-button" ng-click="searchUsers.showAddUserSection()">
	                	<i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;New User
	                </button> 
	                
	            </div>
	
	            <span class="ecomp-spinner" ng-show="searchUsers.isLoading"></span>
	            <div ng-show="UserSearchsIsNull===false">
	                <div class="search-results"
	                     ng-show="!searchUsers.isLoading
	                     && searchUsers.searchUsersResults
	                     && searchUsers.searchUsersResults.length">
	                    <div id="search-results" ng-show="UserSearchsIsNull===false"
	                         class="results-title"
	                         ng-bind="'Showing ' + searchUsers.searchUsersResults.length + ' results'"></div>
	                    <div class="results-container" scroll-top="searchUsers.scrollApi">
	                        <div id="search-result-{{$index}}"
	                             class="user"
	                             ng-repeat="user in (searchUsers.searchUsersResults | orderBy:['firstName','lastName','orgUserId']) | limitTo: 100 track by $index"
	                             ng-click="searchUsers.setSelectedUser(user)"
	                             ng-class="{selected: user.orgUserId === searchUsers.selectedUser.orgUserId}">
	                            <div id="main-name-{{$index}}" class="main-name">
	                                <span id="result-first-name-{{$index}}" ng-bind="::user.firstName"></span>
	                                <span id="result-last-name-{{$index}}"  ng-bind="::user.lastName"></span>
	                                <span id="result-uuid-{{$index}}" ng-bind="::user.orgUserId"></span></div>
	                            <div id="job-title-{{$index}}" class="sub-job-title" ng-bind="::user.jobTitle"></div>
	                            <br/>
	                        </div>
	                    </div>
	                </div>
	            </div>
	            
	            <div class="error-text"
	                 id="user-search-error-403"
	                 ng-show="UserSearchsIsNull===true">
	                No match found.
	            </div>
	            
	            <div id="no-user-found"
	                 class="no-user-found"
	                 ng-show="searchUsers.searchUsersResults && searchUsers.searchUsersResults.length===0 && !searchUsers.searchUsersInProgress">
	                 No users found
	            </div>
            </div>

            
            <div id="addWidget" class="add-user-section" ng-show="searchUsers.showAddUser">
				<div>	        
					<div class="input-new-user-div" >
						  <div  class="">*First Name</div>
						  <input  type="text"  ng-model="searchUsers.newUser.firstName"/>						            
					</div>
					<div class="input-new-user-div" >
						  <div  class="">Middle Name</div>
						  <input  type="text"  ng-model="searchUsers.newUser.middleName"/>						            
					</div>
					<div class="input-new-user-div" >
						  <div class="">*Last Name</div>
						  <input  type="text" ng-model="searchUsers.newUser.lastName"/>
					</div>
					<div class="input-new-user-div" >
						  <div class="">*Email Address ID</div>
						  <input  type="text" ng-model="searchUsers.newUser.emailAddress"/>
					</div>
					<div class="input-new-user-div" >
						  <div class="">*Login ID</div>
						  <input  type="text" ng-model="searchUsers.newUser.loginId"/>
					</div>
					<div class="input-new-user-div" >
						  <div class="">*Login Password</div>
						  <input  type="password" ng-model="searchUsers.newUser.loginPwd"/>
					</div>
					<div class="input-new-user-div" >
						  <div class="">*Confirm Login Password</div>
						  <input  type="password" ng-model="searchUsers.newUser.loginPwdCheck"/>
					</div>
				<div ng-show="searchUsers.newUser.loginPwdCheck.length>=searchUsers.newUser.loginPwd.length&&searchUsers.newUser.loginPwdCheck.length>0&&searchUsers.newUser.loginPwd!=searchUsers.newUser.loginPwdCheck"
						style="color: #cf2a2a; font-size: 12px;">
						<small
							style="position: absolute; margin-top: -6px;">The passwords do not match. Try again.
						</small>
	            </div>
	            <div ng-show="userExist==true"
						style="color: #cf2a2a; font-size: 12px;">
						<small
							style="position: absolute; margin-top: -6px;">User with same loginId already exists. Try again.
						</small>
	            </div>
				</div>
                <div class="add-new-user-btn">
                	<button class="btn btn-alt btn-small" ng-click="searchUsers.addNewUserFun()">Add New User</button>
				</div>
				</div>
																		

		    </div>
            
        </div>

    </form>
</div>