]>
Commit | Line | Data |
---|---|---|
1 | <div i18n class="form-sub-title" *ngIf="isCreation() === true">Create user</div> | |
2 | <div i18n class="form-sub-title" *ngIf="isCreation() === false">Edit user {{ username }}</div> | |
3 | ||
4 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | |
5 | ||
6 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | |
7 | <div class="form-group" *ngIf="isCreation()"> | |
8 | <label i18n for="username">Username</label> | |
9 | <input | |
10 | type="text" id="username" i18n-placeholder placeholder="john" | |
11 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" | |
12 | > | |
13 | <div *ngIf="formErrors.username" class="form-error"> | |
14 | {{ formErrors.username }} | |
15 | </div> | |
16 | </div> | |
17 | ||
18 | <div class="form-group"> | |
19 | <label i18n for="email">Email</label> | |
20 | <input | |
21 | type="text" id="email" i18n-placeholder placeholder="mail@example.com" | |
22 | formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }" | |
23 | > | |
24 | <div *ngIf="formErrors.email" class="form-error"> | |
25 | {{ formErrors.email }} | |
26 | </div> | |
27 | </div> | |
28 | ||
29 | <div class="form-group" *ngIf="isCreation()"> | |
30 | <label i18n for="password">Password</label> | |
31 | <input | |
32 | type="password" id="password" | |
33 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" | |
34 | > | |
35 | <div *ngIf="formErrors.password" class="form-error"> | |
36 | {{ formErrors.password }} | |
37 | </div> | |
38 | </div> | |
39 | ||
40 | <div class="form-group"> | |
41 | <label i18n for="role">Role</label> | |
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> | |
49 | ||
50 | <div *ngIf="formErrors.role" class="form-error"> | |
51 | {{ formErrors.role }} | |
52 | </div> | |
53 | </div> | |
54 | ||
55 | <div class="form-group"> | |
56 | <label i18n for="videoQuota">Video quota</label> | |
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> | |
64 | ||
65 | <div i18n class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()"> | |
66 | Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br /> | |
67 | At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}. | |
68 | </div> | |
69 | </div> | |
70 | ||
71 | <div class="form-group"> | |
72 | <label i18n for="videoQuotaDaily">Daily video quota</label> | |
73 | <div class="peertube-select-container"> | |
74 | <select id="videoQuotaDaily" formControlName="videoQuotaDaily"> | |
75 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> | |
76 | {{ videoQuotaDailyOption.label }} | |
77 | </option> | |
78 | </select> | |
79 | </div> | |
80 | </div> | |
81 | ||
82 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> | |
83 | </form> | |
84 | ||
85 | <div *ngIf="isAdministration"> | |
86 | <div class="account-title" i18n>Danger Zone</div> | |
87 | ||
88 | <p i18n>Send a link to reset the password by mail to the user.</p> | |
89 | <button (click)="resetPassword()" i18n>Ask for new password</button> | |
90 | ||
91 | <p class="mt-4" i18n>Manually set the user password</p> | |
92 | <my-user-password></my-user-password> | |
93 | </div> |