blob: 11cc85c76bf0da5b9bb0dbe08fdc45229ae2131f [file] [log] [blame]
AppaRao Puli28711a62018-10-17 16:07:55 +05301<loader loading="loading"></loader>
Iftekharul Islamcd789502017-04-19 14:37:55 -05002<div id="user-accounts">
AppaRao Pulib1e7c862019-03-12 14:56:40 +05303
4 <div class="row column acnt-prop-header">
5 <h1>User account properties</h1>
6 </div>
7
8 <div class="col-sm-12">
9 <form class="row column user-manage__form">
10 <div class="col-sm-12">
11 <label class="col-md-1 control-label" for="lockoutTime"> User Lockout Time (sec) </label>
12 <div class="col-md-3 acnt-prop__input-wrapper">
13 <input type="number" id="lockoutTime" min="30" max="600" ng-model="properties.AccountLockoutDuration"/>
14 </div>
15 </div>
16 <div class="col-sm-12">
17 <label class="col-md-1 control-label" for="lockoutThreshold"> Failed Login Attempts </label>
18 <div class="col-md-3 acnt-prop__input-wrapper">
19 <input type="number" id="lockoutThreshold" min="3" max="10" ng-model="properties.AccountLockoutThreshold"/>
20 </div>
21 </div>
AppaRao Pulib1e7c862019-03-12 14:56:40 +053022 <div class="acnt-prop__submit-wrapper">
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050023 <button type="button" class="btn btn-primary" ng-click="saveAllValues()">Save settings</button>
AppaRao Pulib1e7c862019-03-12 14:56:40 +053024 </div>
25 </form>
26 </div>
27
Gunnar Mills5f0b7762018-09-25 14:10:45 -050028 <div class="row column">
AppaRao Puli28711a62018-10-17 16:07:55 +053029 <h1>User account information</h1>
30 </div>
AppaRao Pulia83cd052019-01-07 23:25:43 +053031 <div class="table row column user-list__tbl" ng-show="users.length != 0">
AppaRao Puli28711a62018-10-17 16:07:55 +053032 <div class="table__head">
33 <div class="table__row">
34 <div class="table__cell"> Username </div>
35 <div class="table__cell"> Enabled </div>
36 <div class="table__cell"> Role </div>
37 <div class="table__cell"> Locked </div>
38 <div class="table__cell"> Action </div>
39 </div>
40 </div>
41 <div class="table__body">
42 <div class="table__row" ng-repeat="user in users">
43 <div class="table__cell"> {{user.UserName}} </div>
44 <div class="table__cell"> {{user.Enabled}} </div>
45 <div class="table__cell"> {{user.RoleId}} </div>
46 <div class="table__cell"> {{user.Locked}} </div>
47 <div class="table__cell">
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050048 <button type="button" class="btn btn-primary" ng-disabled="isUserSelected" ng-click="setSelectedUser(user)">Edit</button>
49 <button type="button" class="btn btn-primary" ng-disabled="isUserSelected" ng-click="deleteUser(user.UserName)">Delete</button>
AppaRao Puli28711a62018-10-17 16:07:55 +053050 </div>
51 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050052 </div>
53 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +053054 <div class="table row column" ng-show="users.length == 0">
55 <span>No users exist in system</span>
56 </div>
57
beccabroeka5deeea2019-03-22 15:38:49 -050058 <form role="form" name="user__form" class="user-manage__form">
59 <section class="row column" aria-label="user manage form" ng-class="{'submitted':submitted}">
AppaRao Puli28711a62018-10-17 16:07:55 +053060 <div class="column small-12 page-header">
beccabroekedf1ab42019-02-15 16:26:38 -060061 <h2 class="inline">User account settings</h2>
AppaRao Puli28711a62018-10-17 16:07:55 +053062 </div>
63 <div class='col-sm-12'>
AppaRao Pulia83cd052019-01-07 23:25:43 +053064 <label class="col-md-1 control-label" for="user-manage__username">UserName</label>
AppaRao Puli28711a62018-10-17 16:07:55 +053065 <div class="col-md-3">
beccabroeka5deeea2019-03-22 15:38:49 -050066 <input type="text" name="UserName" id="user-manage__username" ng-model="selectedUser.UserName" has-error="doesUserExist()" required />
67 <div ng-messages="user__form.UserName.$error" class="form-error" ng-class="{'visible' : user__form.UserName.$touched || submitted}">
68 <p ng-message="required">Field is required</p>
69 <p ng-message="hasError">Username exists</p>
70 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +053071 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050072 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +053073 <div class='col-sm-12 inline'>
AppaRao Pulia83cd052019-01-07 23:25:43 +053074 <label class="col-md-1 control-label" for="user-manage__passwd">Password</label>
AppaRao Puli28711a62018-10-17 16:07:55 +053075 <div class="col-md-3 user-manage__input-wrapper inline">
beccabroeka5deeea2019-03-22 15:38:49 -050076 <input type="{{showpassword ? 'text' : 'password'}}" class="user-manage__new-password inline" name="Password" id="user-manage__passwd" ng-model="selectedUser.Password" ng-minlength="properties.MinPasswordLength" ng-maxlength="properties.MaxPasswordLength" required autocomplete="off"/>
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -050077 <button ng-model="showpassword" ng-click="togglePassword = !togglePassword; showpassword = !showpassword;" class="btn btn-tertiary password-toggle">
Gunnar Mills5f0b7762018-09-25 14:10:45 -050078 <span ng-hide="togglePassword">Show</span>
79 <span ng-show="togglePassword">Hide</span>
80 </button>
beccabroeka5deeea2019-03-22 15:38:49 -050081 <div ng-messages="user__form.Password.$error" class="form-error" ng-class="{'visible' : user__form.Password.$touched || submitted}">
82 <p ng-message="required">Field is required</p>
83 <p ng-message="minlength">Must be at least {{properties.MinPasswordLength}} characters</p>
84 <p ng-message="maxlength">Must be {{properties.MaxPasswordLength}} characters or less</p>
85 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050086 </div>
87 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +053088 <div class='col-sm-12'>
AppaRao Pulia83cd052019-01-07 23:25:43 +053089 <label class="col-md-1 control-label" for="user-manage__verifypasswd">Retype Password</label>
AppaRao Puli28711a62018-10-17 16:07:55 +053090 <div class="col-md-3 user-manage__input-wrapper inline">
beccabroeka5deeea2019-03-22 15:38:49 -050091 <input type="{{showpasswordVerify ? 'text' : 'password'}}" class="user-manage__verify-password inline" name="VerifyPassword" id="user-manage__verifypasswd" ng-model="selectedUser.VerifyPassword" has-error="selectedUser.VerifyPassword != selectedUser.Password" required autocomplete="off">
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -050092 <button ng-model="showpasswordVerify" ng-click="toggleVerify = !toggleVerify; showpasswordVerify = !showpasswordVerify;" class="btn btn-tertiary password-toggle">
Gunnar Mills5f0b7762018-09-25 14:10:45 -050093 <span ng-hide="toggleVerify">Show</span>
94 <span ng-show="toggleVerify">Hide</span>
95 </button>
beccabroeka5deeea2019-03-22 15:38:49 -050096 <div ng-messages="user__form.VerifyPassword.$error" class="form-error" ng-class="{'visible' : user__form.VerifyPassword.$touched || submitted}">
97 <p ng-message="required">Field is required</p>
98 <p ng-message="hasError">Passwords do not match</p>
99 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -0500100 </div>
101 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +0530102 <div class='col-sm-12'>
beccabroeka5deeea2019-03-22 15:38:49 -0500103 <label class="col-md-1 control-label" for="role">Role</label>
AppaRao Puli28711a62018-10-17 16:07:55 +0530104 <div class="col-md-3 user-manage__input-wrapper inline">
beccabroeka5deeea2019-03-22 15:38:49 -0500105 <select ng-model="selectedUser.RoleId" id="role" name="role" class="inline" required>
AppaRao Puli28711a62018-10-17 16:07:55 +0530106 <option ng-repeat="role in roles" class="inline">{{role}}</option>
107 </select>
beccabroeka5deeea2019-03-22 15:38:49 -0500108 <div ng-messages="user__form.role.$error" class="form-error" ng-class="{'visible' : user__form.role.$touched || submitted}">
109 <p ng-message="required">Field is required</p>
110 </div>
AppaRao Puli28711a62018-10-17 16:07:55 +0530111 </div>
112 </div>
113 <div class='col-sm-12'>
AppaRao Pulia83cd052019-01-07 23:25:43 +0530114 <label class="col-md-1 control-label" for="user-manage__enabled">Enabled</label>
AppaRao Puli28711a62018-10-17 16:07:55 +0530115 <div class="col-md-3 user-manage__input-wrapper inline">
116 <label class="control-check">
AppaRao Pulia83cd052019-01-07 23:25:43 +0530117 <input type="checkbox" name="Enabled" id="user-manage__enabled" ng-model="selectedUser.Enabled"/>
AppaRao Puli28711a62018-10-17 16:07:55 +0530118 <span class="control__indicator"></span>
119 </label>
120 </div>
121 </div>
122 <div class="user-manage__submit-wrapper">
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -0500123 <button type="button" ng-click="submitted=true; user__form.$valid && createNewUser(); user__form.$setUntouched()" ng-show="!isUserSelected" class="btn btn-primary">Create user</button>
124 <button type="button" class="btn btn-primary" ng-click="submitted=true; user__form.$valid && updateUserInfo(); user__form.$setUntouched()" ng-show="isUserSelected">Save</button>
125 <button type="button" class="btn btn-primary" ng-if="isUserSelected" ng-click="cancel()">Cancel</button>
AppaRao Puli28711a62018-10-17 16:07:55 +0530126 </div>
127 </section>
AppaRao Puli28711a62018-10-17 16:07:55 +0530128 </form>
Gunnar Mills6b97dde2018-03-14 17:04:58 -0500129</div>