[FEAT] Password resets

This commit is contained in:
2023-01-19 23:28:55 +00:00
parent f0f03c1175
commit 19698270e5
5 changed files with 56 additions and 0 deletions

View File

@@ -11,5 +11,6 @@
<input type="hidden" name="next" value="{{ next }}"> <input type="hidden" name="next" value="{{ next }}">
<input type="submit" class="btn btn-info" value="Login"> <input type="submit" class="btn btn-info" value="Login">
{% endbuttons %} {% endbuttons %}
<p>Forgot your password? Reset it <a href="{% url 'password_reset' %}">here</a>.</p>
</form> </form>
{% endblock %} {% endblock %}

View File

@@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
<h1>Password Reset Complete</h1>
<p>Your password has been successfully reset. You can now <a href="{% url 'login' %}">log in using it</a>.</p>
{% endblock %}

View File

@@ -0,0 +1,24 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
{% if validlink %}
<h1>Choose a New Password</h1>
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<input type="hidden" name="next" value="{{ next }}">
<input type="submit" class="btn btn-info" value="Change password">
{% endbuttons %}
</form>
{% else %}
<p>That link isn't valid - has it already been used? You can request a new link <a href="{% url 'login' %}">here</a>.</p>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,8 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
<h1>Check Your Inbox</h1>
<p>We've emailed you instructions for how to reset your password.</p>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
<h1>Password Reset</h1>
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<input type="hidden" name="next" value="{{ next }}">
<input type="submit" class="btn btn-info" value="Send reset link">
{% endbuttons %}
</form>
{% endblock %}