From b2a041c7c487c9c169eafc513bfecec154cf4dd7 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Fri, 14 Nov 2025 15:18:57 -0600 Subject: [PATCH] Enhancement: Add forgot password link to login form with instructions on how to properly reset a forgotten password. --- frontend/src/components/forms/LoginForm.jsx | 56 +++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/frontend/src/components/forms/LoginForm.jsx b/frontend/src/components/forms/LoginForm.jsx index 9c4dd57a..6ccf9e81 100644 --- a/frontend/src/components/forms/LoginForm.jsx +++ b/frontend/src/components/forms/LoginForm.jsx @@ -12,6 +12,9 @@ import { Image, Group, Divider, + Modal, + Anchor, + Code, } from '@mantine/core'; import logo from '../../assets/logo.png'; @@ -23,6 +26,7 @@ const LoginForm = () => { const navigate = useNavigate(); // Hook to navigate to other routes const [formData, setFormData] = useState({ username: '', password: '' }); + const [forgotPasswordOpened, setForgotPasswordOpened] = useState(false); useEffect(() => { if (isAuthenticated) { @@ -98,9 +102,61 @@ const LoginForm = () => { + + + { + e.preventDefault(); + setForgotPasswordOpened(true); + }} + > + Forgot password? + + + + setForgotPasswordOpened(false)} + title="Reset Your Password" + centered + > + + + To reset your password, your administrator needs to run a Django + management command: + +
+ + If running with Docker: + + + docker exec <container_name> python manage.py changepassword + <username> + +
+
+ + If running locally: + + python manage.py changepassword <username> +
+ + The command will prompt for a new password. Replace + <container_name> with your Docker container name + and <username> with the account username. + + + Please contact your system administrator to perform a password + reset. + +
+
); };