diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html b/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html index 77dacd1e9..26da47524 100644 --- a/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html +++ b/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html @@ -84,7 +84,7 @@ {{ 'Requests.Details' | translate}} - + {{ 'Requests.Options' | translate}} @@ -103,4 +103,4 @@ - \ No newline at end of file + diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts b/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts index e85bfc08b..7b331e5eb 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts @@ -9,7 +9,7 @@ import { TesterService, NotificationService, RadarrService } from "../../../serv selector: "ombi-settings-radarr-form", templateUrl: "./radarr-form.component.html", styleUrls: ["./radarr-form.component.scss"], - // changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush }) export class RadarrFormComponent implements OnInit { @@ -23,11 +23,11 @@ export class RadarrFormComponent implements OnInit { constructor(private radarrService: RadarrService, private notificationService: NotificationService, private testerService: TesterService, - private controlContainer: ControlContainer) { } + private controlContainer: ControlContainer) { + } public ngOnInit() { this.form = this.controlContainer.control; - // this.toggleValidators(); this.qualities = []; this.qualities.push({ name: "Please Select", id: -1 }); diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html index 724beccf1..5a3e24e90 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html @@ -8,11 +8,13 @@ diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts index 1e2925f13..87f83efcc 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts @@ -1,9 +1,10 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, OnInit, QueryList, ViewChild, ViewChildren } from "@angular/core"; import { FormBuilder, FormGroup } from "@angular/forms"; import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces"; import { NotificationService, SettingsService } from "../../services"; import { FeaturesFacade } from "../../state/features/features.facade"; +import { RadarrFormComponent } from "./components/radarr-form.component"; @Component({ templateUrl: "./radarr.component.html", @@ -19,11 +20,15 @@ export class RadarrComponent implements OnInit { public form: FormGroup; public is4kEnabled: boolean = false; + @ViewChildren('4kForm') public form4k: QueryList; + @ViewChildren('normalForm') public normalForm: QueryList; + constructor(private settingsService: SettingsService, private notificationService: NotificationService, private featureFacade: FeaturesFacade, private fb: FormBuilder) { } + public ngOnInit() { this.is4kEnabled = this.featureFacade.is4kEnabled(); this.settingsService.getRadarr() @@ -56,7 +61,16 @@ export class RadarrComponent implements OnInit { scanForAvailability: [x.radarr4K.scanForAvailability] }), }); + this.normalForm.changes.forEach((comp => { + comp.first.toggleValidators(); + })) + if (this.is4kEnabled) { + this.form4k.changes.forEach((comp => { + comp.first.toggleValidators(); + })) + } }); + }