From c1b5a7f74551fcfc531d2a7508f5af35cbd757bf Mon Sep 17 00:00:00 2001 From: Miodec Date: Sun, 20 Mar 2022 00:24:36 +0100 Subject: [PATCH] added confirm field to the password reset form --- frontend/static/email-handler.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/frontend/static/email-handler.html b/frontend/static/email-handler.html index c3982bfdd..03aa95c33 100644 --- a/frontend/static/email-handler.html +++ b/frontend/static/email-handler.html @@ -151,7 +151,12 @@
@@ -226,7 +231,16 @@ // TODO: Show the reset screen with the user's email and ask the user for // the new password. - var newPassword = $("#middle .resetPassword input").val(); + var newPassword = $("#middle .resetPassword .pwd").val(); + var newPasswordConfirm = $( + "#middle .resetPassword .pwd-confirm" + ).val(); + + if (newPassword !== newPasswordConfirm) { + alert("Passwords do not match"); + showResetPassword(); + return; + } // Save the new password. firebase