diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-video-channels')
2 files changed, 10 insertions, 16 deletions
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts index e38eaae9c..c0eaa4763 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts | |||
@@ -3,15 +3,11 @@ import { Router } from '@angular/router' | |||
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' | 4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' |
5 | import { VideoChannelCreate } from '../../../../../shared/models/videos' | 5 | import { VideoChannelCreate } from '../../../../../shared/models/videos' |
6 | import { | ||
7 | VIDEO_CHANNEL_DESCRIPTION, | ||
8 | VIDEO_CHANNEL_DISPLAY_NAME, | ||
9 | VIDEO_CHANNEL_SUPPORT | ||
10 | } from '@app/shared/forms/form-validators/video-channel' | ||
11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 6 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
12 | import { AuthService } from '@app/core' | 7 | import { AuthService } from '@app/core' |
13 | import { I18n } from '@ngx-translate/i18n-polyfill' | 8 | import { I18n } from '@ngx-translate/i18n-polyfill' |
14 | 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 { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' | ||
15 | 11 | ||
16 | @Component({ | 12 | @Component({ |
17 | selector: 'my-account-video-channel-create', | 13 | selector: 'my-account-video-channel-create', |
@@ -24,6 +20,7 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
24 | constructor ( | 20 | constructor ( |
25 | protected formValidatorService: FormValidatorService, | 21 | protected formValidatorService: FormValidatorService, |
26 | private authService: AuthService, | 22 | private authService: AuthService, |
23 | private videoChannelValidatorsService: VideoChannelValidatorsService, | ||
27 | private notificationsService: NotificationsService, | 24 | private notificationsService: NotificationsService, |
28 | private router: Router, | 25 | private router: Router, |
29 | private videoChannelService: VideoChannelService, | 26 | private videoChannelService: VideoChannelService, |
@@ -34,9 +31,9 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE | |||
34 | 31 | ||
35 | ngOnInit () { | 32 | ngOnInit () { |
36 | this.buildForm({ | 33 | this.buildForm({ |
37 | 'display-name': VIDEO_CHANNEL_DISPLAY_NAME, | 34 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
38 | description: VIDEO_CHANNEL_DESCRIPTION, | 35 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
39 | support: VIDEO_CHANNEL_SUPPORT | 36 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT |
40 | }) | 37 | }) |
41 | } | 38 | } |
42 | 39 | ||
diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts index eda03374a..1510c5015 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts | |||
@@ -3,17 +3,13 @@ import { ActivatedRoute, Router } from '@angular/router' | |||
3 | import { NotificationsService } from 'angular2-notifications' | 3 | import { NotificationsService } from 'angular2-notifications' |
4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' | 4 | import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' |
5 | import { VideoChannelUpdate } from '../../../../../shared/models/videos' | 5 | import { VideoChannelUpdate } from '../../../../../shared/models/videos' |
6 | import { | ||
7 | VIDEO_CHANNEL_DESCRIPTION, | ||
8 | VIDEO_CHANNEL_DISPLAY_NAME, | ||
9 | VIDEO_CHANNEL_SUPPORT | ||
10 | } from '@app/shared/forms/form-validators/video-channel' | ||
11 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 6 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
12 | import { Subscription } from 'rxjs' | 7 | import { Subscription } from 'rxjs' |
13 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 8 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
14 | import { AuthService } from '@app/core' | 9 | import { AuthService } from '@app/core' |
15 | import { I18n } from '@ngx-translate/i18n-polyfill' | 10 | import { I18n } from '@ngx-translate/i18n-polyfill' |
16 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' | 11 | import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' |
12 | import { VideoChannelValidatorsService } from '@app/shared/forms/form-validators/video-channel-validators.service' | ||
17 | 13 | ||
18 | @Component({ | 14 | @Component({ |
19 | selector: 'my-account-video-channel-update', | 15 | selector: 'my-account-video-channel-update', |
@@ -29,6 +25,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
29 | constructor ( | 25 | constructor ( |
30 | protected formValidatorService: FormValidatorService, | 26 | protected formValidatorService: FormValidatorService, |
31 | private authService: AuthService, | 27 | private authService: AuthService, |
28 | private videoChannelValidatorsService: VideoChannelValidatorsService, | ||
32 | private notificationsService: NotificationsService, | 29 | private notificationsService: NotificationsService, |
33 | private router: Router, | 30 | private router: Router, |
34 | private route: ActivatedRoute, | 31 | private route: ActivatedRoute, |
@@ -40,9 +37,9 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
40 | 37 | ||
41 | ngOnInit () { | 38 | ngOnInit () { |
42 | this.buildForm({ | 39 | this.buildForm({ |
43 | 'display-name': VIDEO_CHANNEL_DISPLAY_NAME, | 40 | 'display-name': this.videoChannelValidatorsService.VIDEO_CHANNEL_DISPLAY_NAME, |
44 | description: VIDEO_CHANNEL_DESCRIPTION, | 41 | description: this.videoChannelValidatorsService.VIDEO_CHANNEL_DESCRIPTION, |
45 | support: VIDEO_CHANNEL_SUPPORT | 42 | support: this.videoChannelValidatorsService.VIDEO_CHANNEL_SUPPORT |
46 | }) | 43 | }) |
47 | 44 | ||
48 | this.paramsSub = this.route.params.subscribe(routeParams => { | 45 | this.paramsSub = this.route.params.subscribe(routeParams => { |