From 7ace48819edc63f19f28ba3eedbbfbaa7c6504bd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Aug 2023 11:40:54 +0200 Subject: Add ability to reset originallyPublishedAt --- .../+video-edit/shared/video-edit.component.html | 20 ++++++++++++-------- .../+video-edit/shared/video-edit.component.ts | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) (limited to 'client/src/app/+videos') diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.html b/client/src/app/+videos/+video-edit/shared/video-edit.component.html index ea9909612..f3c1f1634 100644 --- a/client/src/app/+videos/+video-edit/shared/video-edit.component.html +++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.html @@ -365,14 +365,18 @@
- - - - - This is the date when the content was originally published (e.g. the release date for a film) - - - +
+ + + +
+ +
+ This is the date when the content was originally published (e.g. the release date for a film) +
+ c.action !== 'REMOVE') @@ -312,6 +314,8 @@ export class VideoEditComponent implements OnInit, OnDestroy { modalRef.componentInstance.captionEdited.subscribe(this.onCaptionEdited.bind(this)) } + // --------------------------------------------------------------------------- + isSaveReplayAllowed () { return this.serverConfig.live.allowReplay } @@ -328,6 +332,18 @@ export class VideoEditComponent implements OnInit, OnDestroy { return this.serverConfig.live.latencySetting.enabled } + hasPublicationDate () { + return !!this.form.value['originallyPublishedAt'] + } + + // --------------------------------------------------------------------------- + + resetField (name: string) { + this.form.patchValue({ [name]: null }) + } + + // --------------------------------------------------------------------------- + isPluginFieldHidden (pluginField: PluginField) { if (typeof pluginField.commonOptions.hidden !== 'function') return false -- cgit v1.2.3