From 832abcd955d7de57dcf549d75ed40f0de6103e07 Mon Sep 17 00:00:00 2001
From: vinith-kovan <156108204+vinith-kovan@users.noreply.github.com>
Date: Tue, 11 Jun 2024 23:17:55 +0530
Subject: [PATCH] [PM-2057] update two factor email dialog (#9547)
* migrating two factor email component
* two factor email component migration
* two factor email component migration
* two factor email component migration
* two factor email component migration
---
.../src/app/auth/settings/two-factor-email.component.html | 4 ++--
.../web/src/app/auth/settings/two-factor-email.component.ts | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/apps/web/src/app/auth/settings/two-factor-email.component.html b/apps/web/src/app/auth/settings/two-factor-email.component.html
index cf1dba9884..d15bde1d93 100644
--- a/apps/web/src/app/auth/settings/two-factor-email.component.html
+++ b/apps/web/src/app/auth/settings/two-factor-email.component.html
@@ -26,12 +26,12 @@
appInputVerbatim="false"
/>
-
+
- {{ "verificationCodeEmailSent" | i18n: sentEmail }}
+ {{ "emailSent" | i18n }}
diff --git a/apps/web/src/app/auth/settings/two-factor-email.component.ts b/apps/web/src/app/auth/settings/two-factor-email.component.ts
index 8a5c029223..b0b7c0a64f 100644
--- a/apps/web/src/app/auth/settings/two-factor-email.component.ts
+++ b/apps/web/src/app/auth/settings/two-factor-email.component.ts
@@ -31,7 +31,7 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
emailPromise: Promise;
override componentName = "app-two-factor-email";
formGroup = this.formBuilder.group({
- token: [null],
+ token: ["", [Validators.required]],
email: ["", [Validators.email, Validators.required]],
});
@@ -79,6 +79,10 @@ export class TwoFactorEmailComponent extends TwoFactorBaseComponent {
}
submit = async () => {
+ this.formGroup.markAllAsTouched();
+ if (this.formGroup.invalid) {
+ return;
+ }
if (this.enabled) {
await this.disableEmail();
this.onChangeStatus.emit(false);