From 8224e13d3b59ff4420d6c323c95d829ca014a442 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 28 Jul 2022 09:45:15 +0200 Subject: Fix disabled inputs in admin --- .../config/edit-custom-config/edit-basic-configuration.component.ts | 4 +++- .../config/edit-custom-config/edit-vod-transcoding.component.ts | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts index 56227d11c..29910369a 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts @@ -103,7 +103,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { signupControl.valueChanges .pipe(pairwise()) .subscribe(([ oldValue, newValue ]) => { - if (oldValue !== true && newValue === true) { + if (oldValue === false && newValue === true) { /* eslint-disable max-len */ this.signupAlertMessage = $localize`You enabled signup: we automatically enabled the "Block new videos automatically" checkbox of the "Videos" section just below.` @@ -118,5 +118,7 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { }) } }) + + signupControl.updateValueAndValidity() } } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index a38438e3a..184dfd921 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts @@ -104,5 +104,10 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { videoStudioControl.setValue(false) } }) + + transcodingControl.updateValueAndValidity() + webtorrentControl.updateValueAndValidity() + videoStudioControl.updateValueAndValidity() + hlsControl.updateValueAndValidity() } } -- cgit v1.2.3