]>
Commit | Line | Data |
---|---|---|
b1d40cff C |
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> | |
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()"> | |
b1d40cff | 8 | <label i18n for="username">Username</label> |
04e0fc48 | 9 | <input |
b1d40cff | 10 | type="text" id="username" i18n-placeholder 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 | 18 | <div class="form-group"> |
b1d40cff | 19 | <label i18n for="email">Email</label> |
04e0fc48 | 20 | <input |
b1d40cff | 21 | type="text" id="email" i18n-placeholder placeholder="mail@example.com" |
04e0fc48 | 22 | formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }" |
b37a5082 | 23 | autocomplete="off" |
04e0fc48 C |
24 | > |
25 | <div *ngIf="formErrors.email" class="form-error"> | |
26 | {{ formErrors.email }} | |
27 | </div> | |
28 | </div> | |
897ec54d | 29 | |
04e0fc48 | 30 | <div class="form-group" *ngIf="isCreation()"> |
b1d40cff | 31 | <label i18n for="password">Password</label> |
04e0fc48 | 32 | <input |
7738273b | 33 | type="password" id="password" autocomplete="new-password" |
04e0fc48 C |
34 | formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" |
35 | > | |
36 | <div *ngIf="formErrors.password" class="form-error"> | |
37 | {{ formErrors.password }} | |
38 | </div> | |
39 | </div> | |
954605a8 | 40 | |
04e0fc48 | 41 | <div class="form-group"> |
b1d40cff | 42 | <label i18n for="role">Role</label> |
15a7387d C |
43 | <div class="peertube-select-container"> |
44 | <select id="role" formControlName="role"> | |
a95a4cc8 | 45 | <option *ngFor="let role of getRoles()" [value]="role.value"> |
15a7387d C |
46 | {{ role.label }} |
47 | </option> | |
48 | </select> | |
49 | </div> | |
954605a8 | 50 | |
04e0fc48 C |
51 | <div *ngIf="formErrors.role" class="form-error"> |
52 | {{ formErrors.role }} | |
53 | </div> | |
54 | </div> | |
6a84aafd | 55 | |
04e0fc48 | 56 | <div class="form-group"> |
b1d40cff | 57 | <label i18n for="videoQuota">Video quota</label> |
15a7387d C |
58 | <div class="peertube-select-container"> |
59 | <select id="videoQuota" formControlName="videoQuota"> | |
60 | <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value"> | |
61 | {{ videoQuotaOption.label }} | |
62 | </option> | |
63 | </select> | |
64 | </div> | |
d6ca951b C |
65 | |
66 | <div i18n class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()"> | |
67 | Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br /> | |
68 | At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}. | |
69 | </div> | |
70 | </div> | |
71 | ||
72 | <div class="form-group"> | |
bee0abff FA |
73 | <label i18n for="videoQuotaDaily">Daily video quota</label> |
74 | <div class="peertube-select-container"> | |
75 | <select id="videoQuotaDaily" formControlName="videoQuotaDaily"> | |
76 | <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value"> | |
77 | {{ videoQuotaDailyOption.label }} | |
78 | </option> | |
79 | </select> | |
80 | </div> | |
897ec54d | 81 | </div> |
04e0fc48 | 82 | |
1eddc9a7 C |
83 | <div class="form-group"> |
84 | <my-peertube-checkbox | |
85 | inputName="byPassAutoBlacklist" formControlName="byPassAutoBlacklist" | |
86 | i18n-labelText labelText="Bypass video auto blacklist" | |
87 | ></my-peertube-checkbox> | |
88 | </div> | |
89 | ||
e600e1fe | 90 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> |
04e0fc48 | 91 | </form> |
328c78bc | 92 | |
b426edd4 | 93 | <div *ngIf="!isCreation()" class="danger-zone"> |
328c78bc RK |
94 | <div class="account-title" i18n>Danger Zone</div> |
95 | ||
b426edd4 C |
96 | <div class="form-group reset-password-email"> |
97 | <label i18n>Send a link to reset the password by email to the user</label> | |
98 | <button (click)="resetPassword()" i18n>Ask for new password</button> | |
99 | </div> | |
328c78bc | 100 | |
b426edd4 C |
101 | <div class="form-group"> |
102 | <label i18n>Manually set the user password</label> | |
103 | <my-user-password [userId]="userId"></my-user-password> | |
104 | </div> | |
105 | </div> |