From 9786a981c37185cd3e2b5250341d4182dfa25701 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Tue, 9 Apr 2019 21:27:58 +0000 Subject: [PATCH] CAT-211 Vandelay Label Improvements - Cause "Save as New Template" to display as "Modify Template" when an existing template is selected. - Cause "Upload" to display as "Import" when importing from the queue. Signed-off-by: Kyle Huckins Changes to be committed: modified: Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html modified: Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts --- .../src/eg2/src/app/staff/cat/vandelay/import.component.html | 12 ++++++++++-- .../src/eg2/src/app/staff/cat/vandelay/import.component.ts | 5 ++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html index c7f8c17ab1..ed03288c3a 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.html @@ -30,9 +30,12 @@
- + @@ -258,11 +261,16 @@
-
+
+
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts index 15b5640fff..87a2d7f001 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/vandelay/import.component.ts @@ -103,6 +103,7 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { selectedTemplate: string; formTemplates: {[name: string]: any}; newTemplateName: string; + templateInputMatch: boolean; @ViewChild('fileSelector') private fileSelector; @ViewChild('uploadProgress') @@ -589,6 +590,7 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { console.debug('Saving import profile', template); this.formTemplates[this.selectedTemplate] = template; + this.templateInputMatch = true; return this.store.setItem(TEMPLATE_SETTING_NAME, this.formTemplates); } @@ -613,13 +615,14 @@ export class ImportComponent implements OnInit, AfterViewInit, OnDestroy { this.selectedTemplate = entry.label; // label == name if (entry.freetext) { + this.templateInputMatch = false; // User is entering a new template name. // Nothing to apply. return; } // User selected an existing template, apply it to the form. - + this.templateInputMatch = true; const template = this.formTemplates[entry.id]; // Copy the template values into "this" -- 2.11.0