AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 1 | <loader loading="loading"></loader> |
Iftekharul Islam | cd78950 | 2017-04-19 14:37:55 -0500 | [diff] [blame] | 2 | <div id="user-accounts"> |
AppaRao Puli | b1e7c86 | 2019-03-12 14:56:40 +0530 | [diff] [blame] | 3 | |
| 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 Puli | b1e7c86 | 2019-03-12 14:56:40 +0530 | [diff] [blame] | 22 | <div class="acnt-prop__submit-wrapper"> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 23 | <button type="button" class="btn btn-primary" ng-click="saveAllValues()">Save settings</button> |
AppaRao Puli | b1e7c86 | 2019-03-12 14:56:40 +0530 | [diff] [blame] | 24 | </div> |
| 25 | </form> |
| 26 | </div> |
| 27 | |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 28 | <div class="row column"> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 29 | <h1>User account information</h1> |
| 30 | </div> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 31 | <div class="table row column user-list__tbl" ng-show="users.length != 0"> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 32 | <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 Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 48 | <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 Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 50 | </div> |
| 51 | </div> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 52 | </div> |
| 53 | </div> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 54 | <div class="table row column" ng-show="users.length == 0"> |
| 55 | <span>No users exist in system</span> |
| 56 | </div> |
| 57 | |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 58 | <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 Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 60 | <div class="column small-12 page-header"> |
beccabroek | edf1ab4 | 2019-02-15 16:26:38 -0600 | [diff] [blame] | 61 | <h2 class="inline">User account settings</h2> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 62 | </div> |
| 63 | <div class='col-sm-12'> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 64 | <label class="col-md-1 control-label" for="user-manage__username">UserName</label> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 65 | <div class="col-md-3"> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 66 | <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 Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 71 | </div> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 72 | </div> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 73 | <div class='col-sm-12 inline'> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 74 | <label class="col-md-1 control-label" for="user-manage__passwd">Password</label> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 75 | <div class="col-md-3 user-manage__input-wrapper inline"> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 76 | <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 Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 77 | <button ng-model="showpassword" ng-click="togglePassword = !togglePassword; showpassword = !showpassword;" class="btn btn-tertiary password-toggle"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 78 | <span ng-hide="togglePassword">Show</span> |
| 79 | <span ng-show="togglePassword">Hide</span> |
| 80 | </button> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 81 | <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 Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 86 | </div> |
| 87 | </div> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 88 | <div class='col-sm-12'> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 89 | <label class="col-md-1 control-label" for="user-manage__verifypasswd">Retype Password</label> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 90 | <div class="col-md-3 user-manage__input-wrapper inline"> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 91 | <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 Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 92 | <button ng-model="showpasswordVerify" ng-click="toggleVerify = !toggleVerify; showpasswordVerify = !showpasswordVerify;" class="btn btn-tertiary password-toggle"> |
Gunnar Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 93 | <span ng-hide="toggleVerify">Show</span> |
| 94 | <span ng-show="toggleVerify">Hide</span> |
| 95 | </button> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 96 | <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 Mills | 5f0b776 | 2018-09-25 14:10:45 -0500 | [diff] [blame] | 100 | </div> |
| 101 | </div> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 102 | <div class='col-sm-12'> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 103 | <label class="col-md-1 control-label" for="role">Role</label> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 104 | <div class="col-md-3 user-manage__input-wrapper inline"> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 105 | <select ng-model="selectedUser.RoleId" id="role" name="role" class="inline" required> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 106 | <option ng-repeat="role in roles" class="inline">{{role}}</option> |
| 107 | </select> |
beccabroek | a5deeea | 2019-03-22 15:38:49 -0500 | [diff] [blame] | 108 | <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 Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 111 | </div> |
| 112 | </div> |
| 113 | <div class='col-sm-12'> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 114 | <label class="col-md-1 control-label" for="user-manage__enabled">Enabled</label> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 115 | <div class="col-md-3 user-manage__input-wrapper inline"> |
| 116 | <label class="control-check"> |
AppaRao Puli | a83cd05 | 2019-01-07 23:25:43 +0530 | [diff] [blame] | 117 | <input type="checkbox" name="Enabled" id="user-manage__enabled" ng-model="selectedUser.Enabled"/> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 118 | <span class="control__indicator"></span> |
| 119 | </label> |
| 120 | </div> |
| 121 | </div> |
| 122 | <div class="user-manage__submit-wrapper"> |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 123 | <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 Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 126 | </div> |
| 127 | </section> |
AppaRao Puli | 28711a6 | 2018-10-17 16:07:55 +0530 | [diff] [blame] | 128 | </form> |
Gunnar Mills | 6b97dde | 2018-03-14 17:04:58 -0500 | [diff] [blame] | 129 | </div> |