From a08fbd5bfa3077b08c1c9f4a3443ee656cd0aed9 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 18 Aug 2020 16:35:02 -0400 Subject: [PATCH] LP1888723 Angular holdings trims barcode spaces The barcode input form trims leading and trailing spaces from barcodes in the Angular holdings editor. Spaces in the middle of the barcode are not removed. Signed-off-by: Bill Erickson --- Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts index c8aa4d0669..0d0b4ce9a1 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts @@ -361,7 +361,13 @@ export class VolEditComponent implements OnInit { } barcodeChanged(copy: IdlObject, barcode: string) { - // note: copy.barcode(barcode) applied via ngModel + + if (barcode) { + // Scrub leading/trailing spaces from barcodes + barcode = barcode.trim(); + copy.barcode(barcode); + } + copy.ischanged(true); copy._dupe_barcode = false; -- 2.11.0