Fix user create daily quota component

This commit is contained in:
Chocobozzz 2018-08-31 10:05:54 +02:00
parent afd2cba554
commit d6ca951b3c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 14 additions and 8 deletions

View File

@ -32,7 +32,8 @@ export class UserCreateComponent extends UserEdit implements OnInit {
ngOnInit () {
const defaultValues = {
role: UserRole.USER.toString(),
videoQuota: '-1'
videoQuota: '-1',
videoQuotaDaily: '-1'
}
this.buildForm({
@ -40,7 +41,8 @@ export class UserCreateComponent extends UserEdit implements OnInit {
email: this.userValidatorsService.USER_EMAIL,
password: this.userValidatorsService.USER_PASSWORD,
role: this.userValidatorsService.USER_ROLE,
videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA
videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA,
videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY
}, defaultValues)
}

View File

@ -61,7 +61,14 @@
</option>
</select>
</div>
<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">
@ -70,11 +77,6 @@
</option>
</select>
</div>
<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>
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">

View File

@ -17,6 +17,8 @@ input:not([type=submit]) {
input[type=submit] {
@include peertube-button;
@include orange-button;
margin-top: 10px;
}
.transcoding-information {