mirror of https://github.com/Chocobozzz/PeerTube
73 lines
2.4 KiB
HTML
73 lines
2.4 KiB
HTML
<div class="form-sub-title" *ngIf="isCreation() === true">Add user</div>
|
|
<div class="form-sub-title" *ngIf="isCreation() === false">Edit user {{ username }}</div>
|
|
|
|
<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
|
|
|
|
<form role="form" (ngSubmit)="formValidated()" [formGroup]="form">
|
|
<div class="form-group" *ngIf="isCreation()">
|
|
<label for="username">Username</label>
|
|
<input
|
|
type="text" id="username" placeholder="john"
|
|
formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
|
|
>
|
|
<div *ngIf="formErrors.username" class="form-error">
|
|
{{ formErrors.username }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="email">Email</label>
|
|
<input
|
|
type="text" id="email" placeholder="mail@example.com"
|
|
formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
|
|
>
|
|
<div *ngIf="formErrors.email" class="form-error">
|
|
{{ formErrors.email }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" *ngIf="isCreation()">
|
|
<label for="password">Password</label>
|
|
<input
|
|
type="password" id="password"
|
|
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
|
|
>
|
|
<div *ngIf="formErrors.password" class="form-error">
|
|
{{ formErrors.password }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="role">Role</label>
|
|
<div class="peertube-select-container">
|
|
<select id="role" formControlName="role">
|
|
<option *ngFor="let role of roles" [value]="role.value">
|
|
{{ role.label }}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div *ngIf="formErrors.role" class="form-error">
|
|
{{ formErrors.role }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="videoQuota">Video quota</label>
|
|
<div class="peertube-select-container">
|
|
<select id="videoQuota" formControlName="videoQuota">
|
|
<option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value">
|
|
{{ videoQuotaOption.label }}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div 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>
|
|
|
|
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
|
</form>
|