PeerTube/client/src/app/+admin/users/user-edit/user-edit.component.html

105 lines
3.6 KiB
HTML
Raw Normal View History

2018-06-04 16:21:17 +02:00
<div i18n class="form-sub-title" *ngIf="isCreation() === true">Create user</div>
<div i18n class="form-sub-title" *ngIf="isCreation() === false">Edit user {{ username }}</div>
2016-08-09 21:45:21 +02:00
2017-12-08 10:41:49 +01:00
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
2016-08-09 21:45:21 +02:00
2017-12-08 10:41:49 +01:00
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
<div class="form-group" *ngIf="isCreation()">
2018-06-04 16:21:17 +02:00
<label i18n for="username">Username</label>
2017-12-08 10:41:49 +01:00
<input
2018-06-04 16:21:17 +02:00
type="text" id="username" i18n-placeholder placeholder="john"
2017-12-08 10:41:49 +01:00
formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
>
<div *ngIf="formErrors.username" class="form-error">
{{ formErrors.username }}
</div>
</div>
2016-08-09 21:45:21 +02:00
2017-12-08 10:41:49 +01:00
<div class="form-group">
2018-06-04 16:21:17 +02:00
<label i18n for="email">Email</label>
2017-12-08 10:41:49 +01:00
<input
2018-06-04 16:21:17 +02:00
type="text" id="email" i18n-placeholder placeholder="mail@example.com"
2017-12-08 10:41:49 +01:00
formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
>
<div *ngIf="formErrors.email" class="form-error">
{{ formErrors.email }}
</div>
</div>
2017-04-21 18:26:09 +02:00
2017-12-08 10:41:49 +01:00
<div class="form-group" *ngIf="isCreation()">
2018-06-04 16:21:17 +02:00
<label i18n for="password">Password</label>
2017-12-08 10:41:49 +01:00
<input
2017-12-20 14:29:55 +01:00
type="password" id="password"
2017-12-08 10:41:49 +01:00
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
>
<div *ngIf="formErrors.password" class="form-error">
{{ formErrors.password }}
</div>
</div>
2017-12-08 10:41:49 +01:00
<div class="form-group">
2018-06-04 16:21:17 +02:00
<label i18n for="role">Role</label>
2017-12-20 14:29:55 +01:00
<div class="peertube-select-container">
<select id="role" formControlName="role">
2019-07-30 09:59:19 +02:00
<option *ngFor="let role of getRoles()" [value]="role.value">
2017-12-20 14:29:55 +01:00
{{ role.label }}
</option>
</select>
</div>
2017-12-08 10:41:49 +01:00
<div *ngIf="formErrors.role" class="form-error">
{{ formErrors.role }}
</div>
</div>
2017-12-08 10:41:49 +01:00
<div class="form-group">
2018-06-04 16:21:17 +02:00
<label i18n for="videoQuota">Video quota</label>
2017-12-20 14:29:55 +01:00
<div class="peertube-select-container">
<select id="videoQuota" formControlName="videoQuota">
<option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value">
{{ videoQuotaOption.label }}
</option>
</select>
</div>
2018-08-31 10:05:54 +02:00
<div i18n class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()">
Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br />
At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}.
</div>
</div>
<div class="form-group">
<label i18n for="videoQuotaDaily">Daily video quota</label>
<div class="peertube-select-container">
<select id="videoQuotaDaily" formControlName="videoQuotaDaily">
<option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value">
{{ videoQuotaDailyOption.label }}
</option>
</select>
</div>
2017-04-21 18:26:09 +02:00
</div>
2017-12-08 10:41:49 +01:00
2019-04-15 10:49:46 +02:00
<div class="form-group">
<my-peertube-checkbox
inputName="byPassAutoBlacklist" formControlName="byPassAutoBlacklist"
i18n-labelText labelText="Bypass video auto blacklist"
></my-peertube-checkbox>
</div>
2017-12-08 15:22:57 +01:00
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
2017-12-08 10:41:49 +01:00
</form>
<div *ngIf="!isCreation()" class="danger-zone">
<div class="account-title" i18n>Danger Zone</div>
<div class="form-group reset-password-email">
<label i18n>Send a link to reset the password by email to the user</label>
<button (click)="resetPassword()" i18n>Ask for new password</button>
</div>
<div class="form-group">
<label i18n>Manually set the user password</label>
<my-user-password [userId]="userId"></my-user-password>
</div>
</div>