X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-account%2Fmy-account-video-playlists%2Fmy-account-video-playlist-update.component.ts;h=4887fdfb4f5d1bf10b329c7a4471a721bcba901b;hb=978c9d497b36e52196eb7e755406571e5d57cbc7;hp=167d7dd094bae4ee1ea77f9e4bd5121f8e8dbb80;hpb=c5e4e36d2a1ad777233177c11f7f742df717a8e8;p=github%2FChocobozzz%2FPeerTube.git 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 167d7dd09..4887fdfb4 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 @@ -41,13 +41,17 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis ngOnInit () { this.buildForm({ - 'display-name': this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME, + displayName: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DISPLAY_NAME, privacy: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_PRIVACY, description: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_DESCRIPTION, videoChannelId: this.videoPlaylistValidatorsService.VIDEO_PLAYLIST_CHANNEL_ID, thumbnailfile: null }) + this.form.get('privacy').valueChanges.subscribe(privacy => { + this.videoPlaylistValidatorsService.setChannelValidator(this.form.get('videoChannelId'), privacy) + }) + populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) this.paramsSub = this.route.params.subscribe(routeParams => { @@ -85,8 +89,8 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis const body = this.form.value const videoPlaylistUpdate: VideoPlaylistUpdate = { - displayName: body['display-name'], - privacy: body['privacy'], + displayName: body.displayName, + privacy: body.privacy, description: body.description || null, videoChannelId: body.videoChannelId || null, thumbnailfile: body.thumbnailfile || undefined @@ -115,7 +119,7 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis private hydrateFormFromPlaylist () { this.form.patchValue({ - 'display-name': this.videoPlaylistToUpdate.displayName, + displayName: this.videoPlaylistToUpdate.displayName, privacy: this.videoPlaylistToUpdate.privacy.id, description: this.videoPlaylistToUpdate.description, videoChannelId: this.videoPlaylistToUpdate.videoChannel ? this.videoPlaylistToUpdate.videoChannel.id : null