blob: fd9d7cfcfad3289cd30ff6cfa3226d0f558bf51d [file] [log] [blame]
<loader loading="loading"></loader>
<div id="user-accounts">
<div class="row column">
<h1>User account information</h1>
</div>
<div class="table row column user-list__tbl" ng-show="users.length != 0">
<div class="table__head">
<div class="table__row">
<div class="table__cell"> Username </div>
<div class="table__cell"> Enabled </div>
<div class="table__cell"> Role </div>
<div class="table__cell"> Locked </div>
<div class="table__cell"> Action </div>
</div>
</div>
<div class="table__body">
<div class="table__row" ng-repeat="user in users">
<div class="table__cell"> {{user.UserName}} </div>
<div class="table__cell"> {{user.Enabled}} </div>
<div class="table__cell"> {{user.RoleId}} </div>
<div class="table__cell"> {{user.Locked}} </div>
<div class="table__cell">
<button type="button" class="btn-edit inline" ng-disabled="isUserSelected" ng-click="setSelectedUser(user)">Edit</button>
<button type="button" class="btn-delete inline" ng-disabled="isUserSelected" ng-click="deleteUser(user.UserName)">Delete</button>
</div>
</div>
</div>
</div>
<div class="table row column" ng-show="users.length == 0">
<span>No users exist in system</span>
</div>
<form role="form" class="user-manage__form">
<section class="row column" aria-label="user manage form">
<div class="column small-12 page-header">
<h2 class="inline h4">User account settings</h2>
</div>
<div class='col-sm-12'>
<label class="col-md-1 control-label" for="user-manage__username">UserName</label>
<div class="col-md-3">
<input type="text" name="UserName" id="user-manage__username" ng-model="selectedUser.UserName" />
</div>
</div>
<div class='col-sm-12 inline'>
<label class="col-md-1 control-label" for="user-manage__passwd">Password</label>
<div class="col-md-3 user-manage__input-wrapper inline">
<input type="{{showpassword ? 'text' : 'password'}}" class="user-manage__new-password inline" name="Password" id="user-manage__passwd" ng-model="selectedUser.Password" autocomplete="off"/>
<button ng-model="showpassword" ng-click="togglePassword = !togglePassword; showpassword = !showpassword;" class="password-toggle">
<span ng-hide="togglePassword">Show</span>
<span ng-show="togglePassword">Hide</span>
</button>
</div>
</div>
<div class='col-sm-12'>
<label class="col-md-1 control-label" for="user-manage__verifypasswd">Retype Password</label>
<div class="col-md-3 user-manage__input-wrapper inline">
<input type="{{showpasswordVerify ? 'text' : 'password'}}" class="user-manage__verify-password inline" name="VerifyPassword" id="user-manage__verifypasswd" ng-model="selectedUser.VerifyPassword" autocomplete="off">
<button ng-model="showpasswordVerify" ng-click="toggleVerify = !toggleVerify; showpasswordVerify = !showpasswordVerify;" class="password-toggle">
<span ng-hide="toggleVerify">Show</span>
<span ng-show="toggleVerify">Hide</span>
</button>
</div>
</div>
<div class='col-sm-12'>
<label class="col-md-1 control-label" for="user-manage__role">Role</label>
<div class="col-md-3 user-manage__input-wrapper inline">
<select ng-model="selectedUser.RoleId" id="user-manage__role" class="inline">
<option ng-repeat="role in roles" class="inline">{{role}}</option>
</select>
</div>
</div>
<div class='col-sm-12'>
<label class="col-md-1 control-label" for="user-manage__enabled">Enabled</label>
<div class="col-md-3 user-manage__input-wrapper inline">
<label class="control-check">
<input type="checkbox" name="Enabled" id="user-manage__enabled" ng-model="selectedUser.Enabled"/>
<span class="control__indicator"></span>
</label>
</div>
</div>
<div class="user-manage__submit-wrapper">
<button type="button" class="btn-primary inline" ng-if="!isUserSelected" ng-click="createNewUser()">Create User</button>
<button type="button" class="btn-primary inline" ng-if="isUserSelected" ng-click="updateUserInfo()">Save</button>
<button type="button" class="btn-primary inline" ng-if="isUserSelected" ng-click="cancel()">Cancel</button>
</div>
</section>
<section class="row column">
<div class='col-sm-12'>
<p ng-class="'user-manage__' + state" role="alert">
{{outMsg}}
</p>
</div>
</section>
</form>
</div>