X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-edit%2Fshared%2Fvideo-caption-add-modal.component.ts;h=d084a490830a5dd50a494e148e204e54298634ea;hb=ad77475251c3516dd5851a08655be79d7bf76245;hp=45b8c71f816fc5b053c83216e10d3ba7e4df669c;hpb=40e87e9ecc54e3513fb586928330a7855eb192c6;p=github%2FChocobozzz%2FPeerTube.git 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..d084a4908 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 } show () { + this.closingModal = false + this.modal.show() } hide () { + this.closingModal = true + this.modal.hide() } @@ -65,16 +69,16 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni } async addCaption () { - this.closingModal = true + this.hide() const languageId = this.form.value[ 'language' ] const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId) this.captionAdded.emit({ language: languageObject, - captionfile: this.form.value['captionfile'] + captionfile: this.form.value[ 'captionfile' ] }) - this.hide() + this.form.reset() } }