From 8d369bcf843614f3d986e95c0198301fc1c032e5 Mon Sep 17 00:00:00 2001 From: Hinton Date: Mon, 23 May 2022 15:27:49 +0200 Subject: [PATCH] Add error summary --- src/app/organizations/settings/account.component.html | 2 ++ src/app/organizations/settings/account.component.ts | 2 ++ src/locales/en/messages.json | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/src/app/organizations/settings/account.component.html b/src/app/organizations/settings/account.component.html index 4ad37ba7..a4831f40 100644 --- a/src/app/organizations/settings/account.component.html +++ b/src/app/organizations/settings/account.component.html @@ -37,6 +37,8 @@ {{ "identifier" | i18n }} + +
; taxFormPromise: Promise; + showErrorSummary = false; private organizationId: string; @@ -99,6 +100,7 @@ export class AccountComponent { async submit() { this.formData.markAllAsTouched(); + this.showErrorSummary = true; if (!this.formData.valid) { return; diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 00caa39c..9f2a3b85 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -5072,5 +5072,14 @@ }, "inputEmail": { "message": "Input is not an email-address." + }, + "fieldsNeedAttention": { + "message": "$COUNT$ fields above need your attention.", + "placeholders": { + "count": { + "content": "$1", + "example": "4" + } + } } }