diff options
Diffstat (limited to 'client/src/app/videos/+video-watch/modal/video-blacklist.component.ts')
-rw-r--r-- | client/src/app/videos/+video-watch/modal/video-blacklist.component.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts index 357ce39ce..50a7cadd1 100644 --- a/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts +++ b/client/src/app/videos/+video-watch/modal/video-blacklist.component.ts | |||
@@ -34,9 +34,12 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit { | |||
34 | } | 34 | } |
35 | 35 | ||
36 | ngOnInit () { | 36 | ngOnInit () { |
37 | const defaultValues = { unfederate: 'true' } | ||
38 | |||
37 | this.buildForm({ | 39 | this.buildForm({ |
38 | reason: this.videoBlacklistValidatorsService.VIDEO_BLACKLIST_REASON | 40 | reason: this.videoBlacklistValidatorsService.VIDEO_BLACKLIST_REASON, |
39 | }) | 41 | unfederate: null |
42 | }, defaultValues) | ||
40 | } | 43 | } |
41 | 44 | ||
42 | show () { | 45 | show () { |
@@ -50,8 +53,9 @@ export class VideoBlacklistComponent extends FormReactive implements OnInit { | |||
50 | 53 | ||
51 | blacklist () { | 54 | blacklist () { |
52 | const reason = this.form.value[ 'reason' ] || undefined | 55 | const reason = this.form.value[ 'reason' ] || undefined |
56 | const unfederate = this.video.isLocal ? this.form.value[ 'unfederate' ] : undefined | ||
53 | 57 | ||
54 | this.videoBlacklistService.blacklistVideo(this.video.id, reason) | 58 | this.videoBlacklistService.blacklistVideo(this.video.id, reason, unfederate) |
55 | .subscribe( | 59 | .subscribe( |
56 | () => { | 60 | () => { |
57 | this.notifier.success(this.i18n('Video blacklisted.')) | 61 | this.notifier.success(this.i18n('Video blacklisted.')) |