From 62b372cbca491f73ec7a9157c2e5edd1b181aed5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 3 Jul 2019 11:05:47 -0400 Subject: [PATCH] LP1834969 Indicate failures in Angular login Display a Login Failed message in the Angular staff login form when a login attempt fails. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/login.component.html | 5 ++++- Open-ILS/src/eg2/src/app/staff/login.component.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.html b/Open-ILS/src/eg2/src/app/staff/login.component.html index ba474f809f..60bc630757 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.html +++ b/Open-ILS/src/eg2/src/app/staff/login.component.html @@ -48,9 +48,12 @@
-
+
+
+
Login Failed
+
diff --git a/Open-ILS/src/eg2/src/app/staff/login.component.ts b/Open-ILS/src/eg2/src/app/staff/login.component.ts index 2c1ac2a26e..de889f9fb2 100644 --- a/Open-ILS/src/eg2/src/app/staff/login.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/login.component.ts @@ -11,6 +11,7 @@ import {StoreService} from '@eg/core/store.service'; export class StaffLoginComponent implements OnInit { workstations: any[]; + loginFailed: boolean; args = { username : '', @@ -65,6 +66,7 @@ export class StaffLoginComponent implements OnInit { const workstation: string = this.args.workstation; + this.loginFailed = false; this.auth.login(this.args).then( ok => { this.auth.redirectUrl = null; @@ -86,7 +88,7 @@ export class StaffLoginComponent implements OnInit { } }, notOk => { - // indicate failure in the UI. + this.loginFailed = true; } ); } -- 2.43.2