From 390ae2c0c43f551b8b9a14907c59a10201f934f2 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 17 Apr 2020 17:11:29 -0400 Subject: [PATCH] add experimental remainOpenOnError to the record editor Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts index 71255ed2f8..b65acb3cf3 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.ts @@ -139,6 +139,9 @@ export class FmRecordEditorComponent // for displayMode === 'inline' @Input() hideBanner: boolean; + // do not close dialog on error saving record + @Input() remainOpenOnError: boolean = false; + // Emit the modified object when the save action completes. @Output() recordSaved = new EventEmitter(); @@ -618,7 +621,7 @@ export class FmRecordEditorComponent error => { this.recordError.emit(error); this.failStr.current().then(msg => this.toast.warning(msg)); - if (this.isDialog()) { this.error(error); } + if (this.isDialog() && !this.remainOpenOnError) { this.error(error); } } ); } @@ -636,7 +639,7 @@ export class FmRecordEditorComponent error => { this.recordError.emit(error); this.failStr.current().then(msg => this.toast.warning(msg)); - if (this.isDialog()) { this.error(error); } + if (this.isDialog() && !this.remainOpenOnError) { this.error(error); } } ); }); -- 2.11.0