aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
index 45b8c71f8..5498dac22 100644
--- a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -49,10 +49,14 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
49 } 49 }
50 50
51 show () { 51 show () {
52 this.closingModal = false
53
52 this.modal.show() 54 this.modal.show()
53 } 55 }
54 56
55 hide () { 57 hide () {
58 this.closingModal = true
59
56 this.modal.hide() 60 this.modal.hide()
57 } 61 }
58 62
@@ -65,7 +69,7 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
65 } 69 }
66 70
67 async addCaption () { 71 async addCaption () {
68 this.closingModal = true 72 this.hide()
69 73
70 const languageId = this.form.value[ 'language' ] 74 const languageId = this.form.value[ 'language' ]
71 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) 75 const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId)
@@ -74,7 +78,12 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni
74 language: languageObject, 78 language: languageObject,
75 captionfile: this.form.value['captionfile'] 79 captionfile: this.form.value['captionfile']
76 }) 80 })
81 //
82 // this.form.patchValue({
83 // language: null,
84 // captionfile: null
85 // })
77 86
78 this.hide() 87 this.form.reset()
79 } 88 }
80} 89}