-<div class="admin-sub-title" *ngIf="isCreation() === true">Add user</div>
-<div class="admin-sub-title" *ngIf="isCreation() === false">Edit user {{ username }}</div>
+<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>
<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>
+ <label i18n for="username">Username</label>
<input
- type="text" class="form-control" id="username" placeholder="john"
+ type="text" id="username" i18n-placeholder placeholder="john"
formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
>
<div *ngIf="formErrors.username" class="form-error">
</div>
<div class="form-group">
- <label for="email">Email</label>
+ <label i18n for="email">Email</label>
<input
- type="text" class="form-control" id="email" placeholder="mail@example.com"
+ type="text" id="email" i18n-placeholder placeholder="mail@example.com"
formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
>
<div *ngIf="formErrors.email" class="form-error">
</div>
<div class="form-group" *ngIf="isCreation()">
- <label for="password">Password</label>
+ <label i18n for="password">Password</label>
<input
- type="password" class="form-control" id="password"
+ type="password" id="password"
formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
>
<div *ngIf="formErrors.password" class="form-error">
</div>
<div class="form-group">
- <label for="role">Role</label>
- <select class="form-control" id="role" formControlName="role">
- <option *ngFor="let role of roles" [value]="role.value">
- {{ role.label }}
- </option>
- </select>
+ <label i18n 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 class="form-group">
- <label for="videoQuota">Video quota</label>
- <select class="form-control" id="videoQuota" formControlName="videoQuota">
- <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value">
- {{ videoQuotaOption.label }}
- </option>
- </select>
+ <label i18n 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()">
+ <div i18n class="transcoding-information" *ngIf="isTranscodingInformationDisplayed()">
Transcoding is enabled on server. The video quota only take in account <strong>original</strong> video. <br />
- In maximum, this user could use ~ {{ computeQuotaWithTranscoding() | bytes }}.
+ 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>
</div>
- <input type="submit" value="{{ getFormButtonTitle() }}" class="btn btn-default" [disabled]="!form.valid">
+ <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
</form>