aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+videos')
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.html20
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts16
2 files changed, 28 insertions, 8 deletions
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 @@
365 </div> 365 </div>
366 366
367 <div class="form-group originally-published-at"> 367 <div class="form-group originally-published-at">
368 <label i18n for="originallyPublishedAt">Original publication date</label> 368 <div class="label-container">
369 <my-help> 369 <label i18n for="originallyPublishedAt">Original publication date</label>
370 <ng-template ptTemplate="preHtml"> 370
371 <ng-container i18n> 371 <button i18n class="reset-button reset-button-small" (click)="resetField('originallyPublishedAt')" *ngIf="hasPublicationDate()">
372 This is the date when the content was originally published (e.g. the release date for a film) 372 Reset
373 </ng-container> 373 </button>
374 </ng-template> 374 </div>
375 </my-help> 375
376 <div class="form-group-description" i18n>
377 This is the date when the content was originally published (e.g. the release date for a film)
378 </div>
379
376 <p-calendar 380 <p-calendar
377 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" [firstDayOfWeek]="0" 381 id="originallyPublishedAt" formControlName="originallyPublishedAt" [dateFormat]="calendarDateFormat" [firstDayOfWeek]="0"
378 [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange" 382 [showTime]="true" [hideOnDateTimeSelect]="true" [monthNavigator]="true" [yearNavigator]="true" [yearRange]="myYearRange"
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index b0c1352f3..898d3b0a6 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -264,6 +264,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
264 if (this.schedulerInterval) clearInterval(this.schedulerInterval) 264 if (this.schedulerInterval) clearInterval(this.schedulerInterval)
265 } 265 }
266 266
267 // ---------------------------------------------------------------------------
268
267 getExistingCaptions () { 269 getExistingCaptions () {
268 return this.videoCaptions 270 return this.videoCaptions
269 .filter(c => c.action !== 'REMOVE') 271 .filter(c => c.action !== 'REMOVE')
@@ -312,6 +314,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
312 modalRef.componentInstance.captionEdited.subscribe(this.onCaptionEdited.bind(this)) 314 modalRef.componentInstance.captionEdited.subscribe(this.onCaptionEdited.bind(this))
313 } 315 }
314 316
317 // ---------------------------------------------------------------------------
318
315 isSaveReplayAllowed () { 319 isSaveReplayAllowed () {
316 return this.serverConfig.live.allowReplay 320 return this.serverConfig.live.allowReplay
317 } 321 }
@@ -328,6 +332,18 @@ export class VideoEditComponent implements OnInit, OnDestroy {
328 return this.serverConfig.live.latencySetting.enabled 332 return this.serverConfig.live.latencySetting.enabled
329 } 333 }
330 334
335 hasPublicationDate () {
336 return !!this.form.value['originallyPublishedAt']
337 }
338
339 // ---------------------------------------------------------------------------
340
341 resetField (name: string) {
342 this.form.patchValue({ [name]: null })
343 }
344
345 // ---------------------------------------------------------------------------
346
331 isPluginFieldHidden (pluginField: PluginField) { 347 isPluginFieldHidden (pluginField: PluginField) {
332 if (typeof pluginField.commonOptions.hidden !== 'function') return false 348 if (typeof pluginField.commonOptions.hidden !== 'function') return false
333 349