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