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. + +
+
); };