admin-users-create-view.html
139 lines
| 6.9 KiB
| text/html
|
HtmlLexer
r85 | <ng-include src="'templates/loader.html'" ng-if="$ctrl.loading.user"></ng-include> | |||
r0 | ||||
r85 | <div ng-show="!$ctrl.loading.user"> | |||
r0 | ||||
<div class="panel panel-default"> | ||||
<div class="panel-body"> | ||||
r85 | <span class="dropdown" data-uib-dropdown on-toggle="toggled(open)" ng-if="$ctrl.user.id"> | |||
r0 | <a class="btn btn-default" data-uib-dropdown-toggle><span class="fa fa-user-secret"></span> Re-login to user</a> | |||
<ul class="dropdown-menu"> | ||||
<li><a>No</a></li> | ||||
r85 | <li><a ng-click="$ctrl.reloginUser(user)">Yes</a></li> | |||
r0 | </ul> | |||
</span> | ||||
r85 | <form name="$ctrl.profileForm" class="form-horizontal" ng-submit="$ctrl.createUser()"> | |||
r0 | <div class="form-group" id="row-user_name"> | |||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.user_name"></data-form-errors> | |||
r0 | <label for="user_name" id="label-user_name" class="control-label col-sm-4 col-lg-3"> | |||
User name | ||||
<span class="required">*</span> | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control" id="user_name" name="user_name" type="text" ng-model="$ctrl.user.user_name"> | |||
r0 | </div> | |||
</div> | ||||
<div class="form-group" id="row-user_password"> | ||||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.user_password"></data-form-errors> | |||
r0 | <label for="user_password" id="label-user_password" class="control-label col-sm-4 col-lg-3"> | |||
Password | ||||
<span class="required">*</span> | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control" id="user_password" name="user_password" type="password" ng-model="$ctrl.user.user_password"> | |||
r0 | ||||
r85 | <p class="m-t-1"><a class="btn btn-info btn-sm" ng-click="$ctrl.generatePassword()"><span class="fa fa-lock"></span> Generate password</a> | |||
<span ng-show="$ctrl.gen_pass.length > 0">(generated password: {{$ctrl.gen_pass}})</span> | ||||
r0 | </p> | |||
</div> | ||||
</div> | ||||
<div class="form-group" id="row-email"> | ||||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.email"></data-form-errors> | |||
r0 | <label for="email" id="label-email" class="control-label col-sm-4 col-lg-3"> | |||
Email Address | ||||
<span class="required">*</span> | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control" id="email" name="email" type="text" ng-model="$ctrl.user.email"> | |||
r0 | </div> | |||
</div> | ||||
<div class="form-group" id="row-first_name"> | ||||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.first_name"></data-form-errors> | |||
r0 | <label for="first_name" id="label-first_name" class="control-label col-sm-4 col-lg-3"> | |||
First Name | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control" id="first_name" name="first_name" type="text" ng-model="$ctrl.user.first_name"> | |||
r0 | </div> | |||
</div> | ||||
<div class="form-group" id="row-last_name"> | ||||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.last_name"></data-form-errors> | |||
r0 | <label for="last_name" id="label-last_name" class="control-label col-sm-4 col-lg-3"> | |||
Last Name | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control" id="last_name" name="last_name" type="text" ng-model="$ctrl.user.last_name"> | |||
r0 | </div> | |||
</div> | ||||
<div class="form-group" id="row-status"> | ||||
r85 | <data-form-errors errors="$ctrl.profileForm.ae_validation.status"></data-form-errors> | |||
r0 | <label for="status" id="label-status" class="control-label col-sm-4 col-lg-3"> | |||
Active | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input checked class="form-control" id="status" name="status" type="checkbox" ng-model="$ctrl.user.status"> | |||
r0 | </div> | |||
</div> | ||||
<div class="form-group" id="row-submit"> | ||||
<label for="submit" id="label-submit" class="control-label col-sm-4 col-lg-3"> | ||||
</label> | ||||
<div class="col-sm-8 col-lg-9"> | ||||
r85 | <input class="form-control btn btn-primary" id="submit" name="submit" type="submit" value="{{$ctrl.$state.params.userId ? 'Update' : 'Add'}} User"> | |||
r0 | </div> | |||
</div> | ||||
</form> | ||||
</div> | ||||
</div> | ||||
r85 | <div class="panel panel-default" ng-if="$ctrl.user.id"> | |||
r0 | <div class="panel-heading"> | |||
<h3 class="panel-title">Permission Summary</h3> | ||||
</div> | ||||
<div class="panel-body"> | ||||
<h3>Direct application permissions</h3> | ||||
<ul class="list-group"> | ||||
r85 | <li ng-repeat="perm in $ctrl.resourcePermissions.user.application" class="animate-repeat list-group-item"> | |||
r0 | <strong>{{ perm.self.resource_name }}</strong> | |||
<div class="pull-right"> | ||||
<span class="btn btn-primary btn-xs m-r-1" disabled ng-repeat="perm_name in perm.permissions">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span> | ||||
<a class="btn btn-default btn-xs" data-uib-tooltip="Visit Application" data-ui-sref="applications.update({resourceId:perm.self.resource_id})"> | ||||
<span class="fa fa-cog"></span> | ||||
</a> | ||||
</div> | ||||
</li> | ||||
</ul> | ||||
<h3>Direct dashboard permissions</h3> | ||||
<ul class="list-group"> | ||||
r85 | <li ng-repeat="perm in $ctrl.resourcePermissions.user.dashboard" class="animate-repeat list-group-item"> | |||
r0 | <strong>{{ perm.self.resource_name }}</strong> | |||
<div class="pull-right"> | ||||
<span class="btn btn-primary btn-xs m-r-1" disabled ng-repeat="perm_name in perm.permissions">{{ perm.self.owner ? 'Resource owner' : perm_name }}</span> | ||||
<a class="btn btn-default btn-xs" data-uib-tooltip="Visit Dashboard" data-ui-sref="dashboard.update({resourceId:perm.self.resource_id})"> | ||||
<span class="fa fa-cog"></span> | ||||
</a> | ||||
</div> | ||||
</li> | ||||
</ul> | ||||
</div> | ||||
</div> | ||||
</div> | ||||