From d3444059dda456419d5fc7dae32ce807f09aa4af Mon Sep 17 00:00:00 2001 From: Jamie Date: Wed, 5 Dec 2018 20:48:16 +0000 Subject: [PATCH] Sorted out the sonarr settings UI !wip --- .../app/settings/sonarr/sonarr.component.html | 50 +++++++++++-------- .../app/settings/sonarr/sonarr.component.ts | 5 +- src/Ombi/ClientApp/styles/Styles.scss | 2 +- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html index 91385c353..f016fd56e 100644 --- a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html +++ b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html @@ -22,34 +22,40 @@
- +
- + - The IP/Hostname is required
- + - The Port is required
- + - The API Key is required
@@ -68,9 +74,10 @@
-
- +
- A Default Quality - Profile is required +
+
+
@@ -94,7 +102,10 @@
- +
- A Default Root Path - is - required
@@ -119,17 +127,17 @@
- +
- + - A Default - Langauage Profile is required
diff --git a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.ts b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.ts index ee2438f1b..11845a06e 100644 --- a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.ts +++ b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.ts @@ -51,7 +51,7 @@ export class SonarrComponent implements OnInit { addOnly: [x.addOnly], seasonFolders: [x.seasonFolders], v3: [x.v3], - langaugeProfile: [x.languageProfile], + languageProfile: [x.languageProfile], }); if (x.qualityProfile) { @@ -63,6 +63,9 @@ export class SonarrComponent implements OnInit { if(x.languageProfile) { this.getLanguageProfiles(this.form); } + if(x.v3) { + this.form.controls.languageProfile.setValidators([Validators.required]); + } }); this.rootFolders = []; this.qualities = []; diff --git a/src/Ombi/ClientApp/styles/Styles.scss b/src/Ombi/ClientApp/styles/Styles.scss index b41e1c2a7..d98e4cf83 100644 --- a/src/Ombi/ClientApp/styles/Styles.scss +++ b/src/Ombi/ClientApp/styles/Styles.scss @@ -27,4 +27,4 @@ $bg-colour-disabled: #252424; .label { margin: 3px; -} \ No newline at end of file +}