diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts index 149d0d94f..fefc6d607 100644 --- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts +++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts | |||
@@ -4,7 +4,14 @@ import { Component, OnDestroy, OnInit } from '@angular/core' | |||
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { AuthService, Notifier, ServerService } from '@app/core' | 5 | import { AuthService, Notifier, ServerService } from '@app/core' |
6 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 6 | import { populateAsyncUserVideoChannels } from '@app/helpers' |
7 | import { FormValidatorService, VideoPlaylistValidatorsService } from '@app/shared/shared-forms' | 7 | import { |
8 | setPlaylistChannelValidator, | ||
9 | VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, | ||
10 | VIDEO_PLAYLIST_DESCRIPTION_VALIDATOR, | ||
11 | VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR, | ||
12 | VIDEO_PLAYLIST_PRIVACY_VALIDATOR | ||
13 | } from '@app/shared/form-validators/video-playlist-validators' | ||
14 | import { FormValidatorService } from '@app/shared/shared-forms' | ||
8 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 15 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
9 | import { VideoPlaylistUpdate } from '@shared/models' | 16 | import { VideoPlaylistUpdate } from '@shared/models' |
10 | import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit' | 17 | import { MyAccountVideoPlaylistEdit } from './my-account-video-playlist-edit' |
@@ -23,7 +30,6 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis | |||
23 | constructor ( | 30 | constructor ( |
24 | protected formValidatorService: FormValidatorService, | 31 | protected formValidatorService: FormValidatorService, |
25 | private authService: AuthService, | 32 | private authService: AuthService, |
26 | private videoPlaylistValidatorsService: VideoPlaylistValidatorsService, | ||
27 | private notifier: Notifier, | 33 | private notifier: Notifier, |
28 | private router: Router, | 34 | private router: Router, |
29 | private route: ActivatedRoute, | 35 | private route: ActivatedRoute, |
@@ -35,15 +41,15 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis | |||
35 | 41 | ||
36 | ngOnInit () { | 42 | ngOnInit () { |
37 | this.buildForm({ | 43 | this.buildForm({ |
38 | displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME, | 44 | displayName: VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR, |
39 | privacy: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_PRIVACY, | 45 | privacy: VIDEO_PLAYLIST_PRIVACY_VALIDATOR, |
40 | description: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DESCRIPTION, | 46 | description: VIDEO_PLAYLIST_DESCRIPTION_VALIDATOR, |
41 | videoChannelId: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_CHANNEL_ID, | 47 | videoChannelId: VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, |
42 | thumbnailfile: null | 48 | thumbnailfile: null |
43 | }) | 49 | }) |
44 | 50 | ||
45 | this.form.get('privacy').valueChanges.subscribe(privacy => { | 51 | this.form.get('privacy').valueChanges.subscribe(privacy => { |
46 | this.videoPlaylistValidatorsService.setChannelValidator(this.form.get('videoChannelId'), privacy) | 52 | setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) |
47 | }) | 53 | }) |
48 | 54 | ||
49 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | 55 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) |