From e1d618e524680ed5702d6d43bf808b4c665fa157 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 4 Sep 2021 16:50:33 -0700 Subject: Password reset page --- modern/src/components/registration/LoginForm.js | 6 +- modern/src/components/registration/RegisterForm.js | 19 ++-- .../components/registration/ResetPasswordForm.js | 100 +++++++++++++++++++-- 3 files changed, 105 insertions(+), 20 deletions(-) diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js index e5e5b30..8775a98 100644 --- a/modern/src/components/registration/LoginForm.js +++ b/modern/src/components/registration/LoginForm.js @@ -35,7 +35,7 @@ const LoginForm = () => { const registrationEnabled = useSelector((state) => (state.session.server ? state.session.server.registration : false)); const emailEnabled = useSelector((state) => (state.session.server ? state.session.server.emailEnabled : false)); - const handleLogin = async (event) => { + const handleSubmit = async (event) => { event.preventDefault(); const response = await fetch('/api/session', { method: 'POST', @@ -53,7 +53,7 @@ const LoginForm = () => { const handleSpecialKey = (e) => { if (e.keyCode === 13 && email && password) { - handleLogin(e); + handleSubmit(e); } }; @@ -101,7 +101,7 @@ const LoginForm = () => { + + + + ); +}; export default ResetPasswordForm; -- cgit v1.2.3