From 78c3fd57dcce665ee839ceb8b4d44665f7a523c1 Mon Sep 17 00:00:00 2001 From: siddhantCodes Date: Tue, 27 Aug 2024 22:37:16 +0530 Subject: [PATCH] Fix: forgot password success page The password recovery message component (or forgot password success component) now takes an `email` and uses it in the message rather than the hardcoded "abc@fifthtry.com". --- pages/password-recovery.ftd | 18 ++++++++++-------- scenarios/password-recovery.ftd | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pages/password-recovery.ftd b/pages/password-recovery.ftd index 01d34585..404c3efd 100644 --- a/pages/password-recovery.ftd +++ b/pages/password-recovery.ftd @@ -4,6 +4,7 @@ -- import: ui.fifthtry.com/records/user-data as ud -- component page: +string email: module site-data: site-data module authenticate-user: authenticate-user ud.user-data user-data: @@ -35,15 +36,13 @@ hide-header: true -- ds.heading-small: Recover password width: hug-content - -- ds.copy-large: + -- ds.copy-large: $msg(e = $page.email) align: center - We have sent link to abc@fiftry.com to reset your password. - -- ds.primary-button: Login - ;;$on-click$: $page.authenticate-user.submit-values(username = $page.current-username, password = $page.current-password) width: full radius: curved + link: $page.site-data.sign-in-url -- end: ds.column @@ -66,15 +65,13 @@ hide-header: true -- ds.heading-small: Recover password width: hug-content - -- ds.copy-large: + -- ds.copy-large: $msg(e = $page.email) align: center - We have sent link to abc@fiftry.com to reset your password. - -- ds.primary-button: Login - ;;$on-click$: $page.authenticate-user.submit-values(username = $page.current-username, password = $page.current-password) width: full radius: curved + link: $page.site-data.sign-in-url -- end: ds.column @@ -85,3 +82,8 @@ hide-header: true -- end: p.page -- end: page + +-- string msg(e): +string e: + +"We have sent link to " + e + " to reset your password." diff --git a/scenarios/password-recovery.ftd b/scenarios/password-recovery.ftd index 9dd0240c..d47a69b2 100644 --- a/scenarios/password-recovery.ftd +++ b/scenarios/password-recovery.ftd @@ -5,3 +5,4 @@ -- password-recovery.page: site-data: scenario-site user-data: $john-doe.jd +email: abc@mail.com