diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:01:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 15:02:27 +0200 |
commit | e309822b93d9b69f30cbe830ef3d09dfdb2c13b2 (patch) | |
tree | 41dbc3b3108ced7fdba4062974e568695c30e486 /client/src/app/+admin/users/user-edit/user-create.component.ts | |
parent | d4d5853e65e584ca51c718f8df590b987f981047 (diff) | |
download | PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.gz PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.tar.zst PeerTube-e309822b93d9b69f30cbe830ef3d09dfdb2c13b2.zip |
Add form validator translations
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-create.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-create.component.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts index e5f0903b6..c15cfb267 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/users/user-edit/user-create.component.ts | |||
@@ -2,12 +2,12 @@ import { Component, OnInit } from '@angular/core' | |||
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { UserService } from '../shared' | 4 | import { UserService } from '../shared' |
5 | import { USER_EMAIL, USER_PASSWORD, USER_ROLE, USER_USERNAME, USER_VIDEO_QUOTA } from '../../../shared' | ||
6 | import { ServerService } from '../../../core' | 5 | import { ServerService } from '../../../core' |
7 | import { UserCreate, UserRole } from '../../../../../../shared' | 6 | import { UserCreate, UserRole } from '../../../../../../shared' |
8 | import { UserEdit } from './user-edit' | 7 | import { UserEdit } from './user-edit' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
10 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 9 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
10 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' | ||
11 | 11 | ||
12 | @Component({ | 12 | @Component({ |
13 | selector: 'my-user-create', | 13 | selector: 'my-user-create', |
@@ -20,6 +20,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { | |||
20 | constructor ( | 20 | constructor ( |
21 | protected serverService: ServerService, | 21 | protected serverService: ServerService, |
22 | protected formValidatorService: FormValidatorService, | 22 | protected formValidatorService: FormValidatorService, |
23 | private userValidatorsService: UserValidatorsService, | ||
23 | private router: Router, | 24 | private router: Router, |
24 | private notificationsService: NotificationsService, | 25 | private notificationsService: NotificationsService, |
25 | private userService: UserService, | 26 | private userService: UserService, |
@@ -35,11 +36,11 @@ export class UserCreateComponent extends UserEdit implements OnInit { | |||
35 | } | 36 | } |
36 | 37 | ||
37 | this.buildForm({ | 38 | this.buildForm({ |
38 | username: USER_USERNAME, | 39 | username: this.userValidatorsService.USER_USERNAME, |
39 | email: USER_EMAIL, | 40 | email: this.userValidatorsService.USER_EMAIL, |
40 | password: USER_PASSWORD, | 41 | password: this.userValidatorsService.USER_PASSWORD, |
41 | role: USER_ROLE, | 42 | role: this.userValidatorsService.USER_ROLE, |
42 | videoQuota: USER_VIDEO_QUOTA | 43 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA |
43 | }, defaultValues) | 44 | }, defaultValues) |
44 | } | 45 | } |
45 | 46 | ||