mirror of
https://github.com/bitwarden/web
synced 2026-01-02 08:33:18 +00:00
Add error summary
This commit is contained in:
@@ -37,6 +37,8 @@
|
||||
<bit-label>{{ "identifier" | i18n }}</bit-label>
|
||||
<input bitInput type="text" formControlName="identifier" />
|
||||
</bit-form-field>
|
||||
|
||||
<bit-error-summary *ngIf="showErrorSummary" [formGroup]="formData"></bit-error-summary>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<app-avatar
|
||||
|
||||
@@ -42,6 +42,7 @@ export class AccountComponent {
|
||||
org: OrganizationResponse;
|
||||
formPromise: Promise<any>;
|
||||
taxFormPromise: Promise<any>;
|
||||
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;
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user