From ef1cfe0e4d1c5bb9f43a2b87e19e06fa2a334d2c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 16 Apr 2021 10:15:51 -0400 Subject: [PATCH] LP1904036 Patron edit require email if using Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts index 617436ad4a..37c9bf3ac1 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts @@ -1108,9 +1108,15 @@ export class EditComponent implements OnInit, AfterViewInit { fieldRequired(field: string): boolean { - // Password field is only required for new patrons. - if (field === 'au.passwd') { - return this.patronId === null; + switch (field) { + case 'au.passwd': + // Only required for new patrons + return this.patronId === null; + + case 'au.email': + // If the user ops in for email notices, require + // an email address + return this.holdNotifyTypes.email; } return this.fieldVisibility[field] === 3; -- 2.11.0