|
|
|
@ -1,153 +1,150 @@
|
|
|
|
|
<div *ngIf="!edit">
|
|
|
|
|
<h3 >Create User</h3>
|
|
|
|
|
<h3 *ngIf="!edit">Create User</h3>
|
|
|
|
|
<h3 *ngIf="edit && user"> User: {{user.userName}}</h3>
|
|
|
|
|
<button type="button" class="btn btn-primary-outline" style="float:right;" [routerLink]="['/usermanagement/']">Back</button>
|
|
|
|
|
<div *ngIf="!edit || edit && user">
|
|
|
|
|
|
|
|
|
|
<div class="modal-body" style="margin-top: 45px;">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h4>User Details</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h4>Roles</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="username" class="control-label">Username</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.userName" class="form-control form-control-custom " id="username" name="username" value="{{user?.userName}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="alias" class="control-label">Alias</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.alias" class="form-control form-control-custom " id="alias" name="alias" value="{{user?.alias}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="emailAddress" class="control-label">Email Address</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.emailAddress" class="form-control form-control-custom " id="emailAddress" name="emailAddress" value="{{user?.emailAddress}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="password" class="control-label">Password</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="password" [(ngModel)]="user.password" class="form-control form-control-custom " id="password" name="password">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="confirmPass" class="control-label">Confirm Password</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="password" [(ngModel)]="confirmPass" class="form-control form-control-custom " id="confirmPass" name="confirmPass">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body" style="margin-top: 45px;">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h4>User Details</h4>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div *ngFor="let c of availableClaims">
|
|
|
|
|
<h4>User Settings</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<input type="checkbox" [(ngModel)]="c.enabled" [value]="c.value" id="create{{c.value}}" [attr.name]="'create' + c.value" ng-checked="c.enabled">
|
|
|
|
|
<label for="create{{c.value}}">{{c.value | humanize}}</label>
|
|
|
|
|
<label for="username" class="control-label">Username</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.userName" class="form-control form-control-custom " id="username"
|
|
|
|
|
name="username" value="{{user?.userName}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="alias" class="control-label">Alias</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.alias" class="form-control form-control-custom " id="alias"
|
|
|
|
|
name="alias" value="{{user?.alias}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="emailAddress" class="control-label">Email Address</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.emailAddress" class="form-control form-control-custom " id="emailAddress"
|
|
|
|
|
name="emailAddress" value="{{user?.emailAddress}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="movieRequestLimit" class="control-label">Movie Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.movieRequestLimit" class="form-control form-small form-control-custom " id="movieRequestLimit" name="movieRequestLimit" value="{{user?.movieRequestLimit}}">
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="password" class="control-label">Password</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="password" [(ngModel)]="user.password" class="form-control form-control-custom " id="password"
|
|
|
|
|
name="password">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="episodeRequestLimit" class="control-label">Episode Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.episodeRequestLimit" class="form-control form-small form-control-custom " id="episodeRequestLimit" name="episodeRequestLimit" value="{{user?.episodeRequestLimit}}">
|
|
|
|
|
<div class="form-group" *ngIf="!edit">
|
|
|
|
|
<label for="confirmPass" class="control-label">Confirm Password</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="password" [(ngModel)]="confirmPass" class="form-control form-control-custom " id="confirmPass"
|
|
|
|
|
name="confirmPass">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<button type="button" class="btn btn-danger-outline" (click)="create()">Create</button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<ngb-accordion [closeOthers]="true" activeIds="0-header">
|
|
|
|
|
<ngb-panel title="Roles">
|
|
|
|
|
<ng-template ngbPanelContent>
|
|
|
|
|
<div class="panel panel-default a">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
|
|
<div *ngIf="edit">
|
|
|
|
|
<div *ngIf="!edit">
|
|
|
|
|
<div *ngFor="let c of availableClaims">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<input type="checkbox" [(ngModel)]="c.enabled" [value]="c.value" id="create{{c.value}}"
|
|
|
|
|
[attr.name]="'create' + c.value" ng-checked="c.enabled">
|
|
|
|
|
<label for="create{{c.value}}">{{c.value | humanize}}</label>
|
|
|
|
|
|
|
|
|
|
<div *ngIf="user">
|
|
|
|
|
<div class="user-details">
|
|
|
|
|
<h3>User: {{user.userName}}</h3>
|
|
|
|
|
<button type="button" class="btn btn-primary-outline" style="float:right;" [routerLink]="['/usermanagement/']">Back</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p-confirmDialog></p-confirmDialog>
|
|
|
|
|
|
|
|
|
|
<div class="modal-body" style="margin-top: 45px;">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h4>User Details</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h4>Roles</h4>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="username" class="control-label">Username</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.userName" [readonly]="true" class="form-control form-control-custom " id="username" name="username" value="{{user?.userName}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="alias" class="control-label">Alias</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.alias" class="form-control form-control-custom " id="alias" name="alias" value="{{user?.alias}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="emailAddress" class="control-label">Email Address</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.emailAddress" class="form-control form-control-custom " id="emailAddress" name="emailAddress" value="{{user?.emailAddress}}" [disabled]="user?.userType == 2">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngIf="edit">
|
|
|
|
|
<div *ngFor="let c of user.claims">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<input type="checkbox" [(ngModel)]="c.enabled" [value]="c.value" id="create{{c.value}}"
|
|
|
|
|
[attr.name]="'create' + c.value" ng-checked="c.enabled">
|
|
|
|
|
<label for="create{{c.value}}">{{c.value | humanize}}</label>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</ng-template>
|
|
|
|
|
</ngb-panel>
|
|
|
|
|
<ngb-panel title="Request Limits">
|
|
|
|
|
<ng-template ngbPanelContent>
|
|
|
|
|
<div class="panel panel-default a">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<div *ngFor="let c of user.claims">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="checkbox">
|
|
|
|
|
<input type="checkbox" [(ngModel)]="c.enabled" [value]="c.value" id="create{{c.value}}" [attr.name]="'create' + c.value" ng-checked="c.enabled">
|
|
|
|
|
<label for="create{{c.value}}">{{c.value | humanize}}</label>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="movieRequestLimit" class="control-label">Movie Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.movieRequestLimit" class="form-control form-small form-control-custom "
|
|
|
|
|
id="movieRequestLimit" name="movieRequestLimit" value="{{user?.movieRequestLimit}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="movieRequestLimit" class="control-label">Movie Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.movieRequestLimit" class="form-control form-small form-control-custom " id="movieRequestLimit" name="movieRequestLimit" value="{{user?.movieRequestLimit}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="episodeRequestLimit" class="control-label">Episode Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.episodeRequestLimit" class="form-control form-small form-control-custom "
|
|
|
|
|
id="episodeRequestLimit" name="episodeRequestLimit" value="{{user?.episodeRequestLimit}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="episodeRequestLimit" class="control-label">Episode Request Limit</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="user.episodeRequestLimit" class="form-control form-small form-control-custom " id="episodeRequestLimit" name="episodeRequestLimit" value="{{user?.episodeRequestLimit}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ng-template>
|
|
|
|
|
</ngb-panel>
|
|
|
|
|
<ngb-panel title="Notification Preferences" *ngIf="notificationPreferences">
|
|
|
|
|
<ng-template ngbPanelContent>
|
|
|
|
|
<div class="panel panel-default a">
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div *ngFor="let pref of notificationPreferences">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="{{pref.agent}}" class="control-label">{{NotificationAgent[pref.agent] | humanize}}</label>
|
|
|
|
|
<div>
|
|
|
|
|
<input type="text" [(ngModel)]="pref.value" class="form-control form-control-custom"
|
|
|
|
|
name="{{pref.agent}}" value="{{pref?.value}}">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</ng-template>
|
|
|
|
|
</ngb-panel>
|
|
|
|
|
</ngb-accordion>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
<button *ngIf="!edit" type="button" class="btn btn-danger-outline" (click)="create()">Create</button>
|
|
|
|
|
<div *ngIf="edit">
|
|
|
|
|
<button type="button" class="btn btn-primary-outline" (click)="update()">Update</button>
|
|
|
|
|
<button type="button" class="btn btn-danger-outline" (click)="delete()">Delete</button>
|
|
|
|
|
<button type="button" style="float:right;" class="btn btn-info-outline" (click)="resetPassword()" pTooltip="You need your SMTP settings setup">Send Reset Password Link</button>
|
|
|
|
|
|
|
|
|
|
<button type="button" style="float:right;" class="btn btn-info-outline" (click)="resetPassword()"
|
|
|
|
|
pTooltip="You need your SMTP settings setup">Send Reset Password Link</button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|