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

82 lines
2.9 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">
<option *ngFor="let role of roles" [value]="role.value">
{{ 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>
<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-09-04 20:07:54 +02:00
2018-06-04 16:21:17 +02:00
<div i18n class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()">
2017-12-08 10:41:49 +01:00
Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br />
2018-01-09 17:22:26 +01:00
At most, this user could use ~ {{ computeQuotaWithTranscoding() | bytes: 0 }}.
2017-12-08 10:41:49 +01:00
</div>
2017-04-21 18:26:09 +02:00
</div>
2017-12-08 10:41:49 +01:00
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>