From e520f9b6a403cf23f09caa469ec3379a9a296ad6 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Tue, 1 Sep 2020 11:35:58 -0700 Subject: [PATCH] LP1849212: simplified editor correct form input labels Signed-off-by: Jane Sandberg --- .../marc-edit/simplified-editor/simplified-editor.component.html | 2 +- .../marc-edit/simplified-editor/simplified-editor.component.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.html index 5bc0b79128..52acfc0480 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.html @@ -5,7 +5,7 @@
diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.ts index ca3d14264c..8ac4dd4dd6 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/simplified-editor/simplified-editor.component.ts @@ -24,7 +24,7 @@ export class MarcSimplifiedEditorComponent implements AfterViewInit, OnInit { idPrefix: string; fieldIndex = 0; - fieldLabels: string[] = []; + subfieldLabels: {[tag: string]: {[subfield: string]: string}}; addField: (field: MarcField) => void; @@ -50,7 +50,9 @@ export class MarcSimplifiedEditorComponent implements AfterViewInit, OnInit { ngAfterViewInit() { this.tagTable.loadTags({marcRecordType: 'biblio', ffType: 'BKS'}).then(table => { this.fields.forEach((field) => { - this.fieldLabels[field.fieldId] = table.getSubfieldLabel(field.tag, field.subfields[0][0]); + field.subfields.forEach((subfield) => { + this.subfieldLabels[field.tag][subfield[0]] = table.getSubfieldLabel(field.tag, subfield[0]); + }) }); }); } -- 2.11.0