2017-04-21 18:26:09 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="content-padding">
|
2016-08-09 21:45:21 +02:00
|
|
|
|
2017-09-05 21:29:39 +02:00
|
|
|
<h3 *ngIf="isCreation() === true">Add user</h3>
|
|
|
|
<h3 *ngIf="isCreation() === false">Edit user {{ username }}</h3>
|
2016-08-09 21:45:21 +02:00
|
|
|
|
2017-04-21 18:26:09 +02:00
|
|
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
2016-08-09 21:45:21 +02:00
|
|
|
|
2017-09-05 21:29:39 +02:00
|
|
|
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
|
|
|
|
<div class="form-group" *ngIf="isCreation()">
|
2017-04-21 18:26:09 +02:00
|
|
|
<label for="username">Username</label>
|
|
|
|
<input
|
2017-09-04 20:07:54 +02:00
|
|
|
type="text" class="form-control" id="username" placeholder="john"
|
2017-04-21 18:26:09 +02:00
|
|
|
formControlName="username"
|
|
|
|
>
|
|
|
|
<div *ngIf="formErrors.username" class="alert alert-danger">
|
|
|
|
{{ formErrors.username }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-02-18 09:29:59 +01:00
|
|
|
|
2017-04-21 18:26:09 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="email">Email</label>
|
|
|
|
<input
|
2017-09-04 20:07:54 +02:00
|
|
|
type="text" class="form-control" id="email" placeholder="mail@example.com"
|
2017-04-21 18:26:09 +02:00
|
|
|
formControlName="email"
|
|
|
|
>
|
|
|
|
<div *ngIf="formErrors.email" class="alert alert-danger">
|
|
|
|
{{ formErrors.email }}
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-09 21:45:21 +02:00
|
|
|
|
2017-09-05 21:29:39 +02:00
|
|
|
<div class="form-group" *ngIf="isCreation()">
|
2017-04-21 18:26:09 +02:00
|
|
|
<label for="password">Password</label>
|
|
|
|
<input
|
2017-09-04 20:07:54 +02:00
|
|
|
type="password" class="form-control" id="password"
|
2017-04-21 18:26:09 +02:00
|
|
|
formControlName="password"
|
|
|
|
>
|
|
|
|
<div *ngIf="formErrors.password" class="alert alert-danger">
|
|
|
|
{{ formErrors.password }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-10-27 16:55:03 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="role">Role</label>
|
|
|
|
<select class="form-control" id="role" formControlName="role">
|
|
|
|
<option *ngFor="let role of roles" [value]="role.value">
|
|
|
|
{{ role.label }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<div *ngIf="formErrors.role" class="alert alert-danger">
|
|
|
|
{{ formErrors.role }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-04 20:07:54 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="videoQuota">Video quota</label>
|
|
|
|
<select class="form-control" id="videoQuota" formControlName="videoQuota">
|
2017-09-05 21:29:39 +02:00
|
|
|
<option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value">
|
|
|
|
{{ videoQuotaOption.label }}
|
|
|
|
</option>
|
2017-09-04 20:07:54 +02:00
|
|
|
</select>
|
2017-10-19 17:33:32 +02:00
|
|
|
|
|
|
|
<div class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()">
|
|
|
|
Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br />
|
|
|
|
In maximum, this user could use ~ {{ computeQuotaWithTranscoding() | bytes }}.
|
|
|
|
</div>
|
2017-09-04 20:07:54 +02:00
|
|
|
</div>
|
|
|
|
|
2017-09-05 21:29:39 +02:00
|
|
|
<input type="submit" value="{{ getFormButtonTitle() }}" class="btn btn-default" [disabled]="!form.valid">
|
2017-04-21 18:26:09 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|