From: Galen Charlton Date: Fri, 17 Apr 2020 21:11:29 +0000 (-0400) Subject: fm-edit: add experimental remainOpenOnError to the record editor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=49fb14e741153c73633523d9514e039b1939a3af;p=working%2FEvergreen.git fm-edit: add experimental remainOpenOnError to the record editor Signed-off-by: Galen Charlton --- 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 e809b7d72d..aa33f6d4e2 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(); @@ -621,7 +624,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); } } ); } @@ -639,7 +642,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); } } ); });