mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
added confirm field to the password reset form
This commit is contained in:
parent
7061b56184
commit
c1b5a7f745
1 changed files with 16 additions and 2 deletions
|
|
@ -151,7 +151,12 @@
|
|||
<div class="subText"></div>
|
||||
</div>
|
||||
<div class="resetPassword hidden">
|
||||
<input type="password" placeholder="New password" />
|
||||
<input class="pwd" type="password" placeholder="New password" />
|
||||
<input
|
||||
class="pwd-confirm"
|
||||
type="password"
|
||||
placeholder="Confirm new password"
|
||||
/>
|
||||
<div class="button">Change</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue