]>
Commit | Line | Data |
---|---|---|
897ec54d C |
1 | <div class="row"> |
2 | <div class="content-padding"> | |
7da18e44 | 3 | |
8094a898 C |
4 | <h3 *ngIf="isCreation() === true">Add user</h3> |
5 | <h3 *ngIf="isCreation() === false">Edit user {{ username }}</h3> | |
7da18e44 | 6 | |
897ec54d | 7 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> |
7da18e44 | 8 | |
8094a898 C |
9 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> |
10 | <div class="form-group" *ngIf="isCreation()"> | |
897ec54d C |
11 | <label for="username">Username</label> |
12 | <input | |
b0f9f39e | 13 | type="text" class="form-control" id="username" placeholder="john" |
897ec54d C |
14 | formControlName="username" |
15 | > | |
16 | <div *ngIf="formErrors.username" class="alert alert-danger"> | |
17 | {{ formErrors.username }} | |
18 | </div> | |
19 | </div> | |
ad4a8a1c | 20 | |
897ec54d C |
21 | <div class="form-group"> |
22 | <label for="email">Email</label> | |
23 | <input | |
b0f9f39e | 24 | type="text" class="form-control" id="email" placeholder="mail@example.com" |
897ec54d C |
25 | formControlName="email" |
26 | > | |
27 | <div *ngIf="formErrors.email" class="alert alert-danger"> | |
28 | {{ formErrors.email }} | |
29 | </div> | |
30 | </div> | |
7da18e44 | 31 | |
8094a898 | 32 | <div class="form-group" *ngIf="isCreation()"> |
897ec54d C |
33 | <label for="password">Password</label> |
34 | <input | |
b0f9f39e | 35 | type="password" class="form-control" id="password" |
897ec54d C |
36 | formControlName="password" |
37 | > | |
38 | <div *ngIf="formErrors.password" class="alert alert-danger"> | |
39 | {{ formErrors.password }} | |
40 | </div> | |
41 | </div> | |
42 | ||
954605a8 C |
43 | <div class="form-group"> |
44 | <label for="role">Role</label> | |
45 | <select class="form-control" id="role" formControlName="role"> | |
46 | <option *ngFor="let role of roles" [value]="role.value"> | |
47 | {{ role.label }} | |
48 | </option> | |
49 | </select> | |
50 | ||
51 | <div *ngIf="formErrors.role" class="alert alert-danger"> | |
52 | {{ formErrors.role }} | |
53 | </div> | |
54 | </div> | |
55 | ||
b0f9f39e C |
56 | <div class="form-group"> |
57 | <label for="videoQuota">Video quota</label> | |
58 | <select class="form-control" id="videoQuota" formControlName="videoQuota"> | |
8094a898 C |
59 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> |
60 | {{ videoQuotaOption.label }} | |
61 | </option> | |
b0f9f39e | 62 | </select> |
6a84aafd C |
63 | |
64 | <div class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()"> | |
65 | Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br /> | |
66 | In maximum, this user could use ~ {{ computeQuotaWithTranscoding() | bytes }}. | |
67 | </div> | |
b0f9f39e C |
68 | </div> |
69 | ||
8094a898 | 70 | <input type="submit" value="{{ getFormButtonTitle() }}" class="btn btn-default" [disabled]="!form.valid"> |
897ec54d C |
71 | </form> |
72 | </div> | |
73 | </div> |