This commit is contained in:
Ross
2022-06-09 18:15:42 +01:00
parent 8c10e2160a
commit 33e82e8676
4 changed files with 65 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<div class="anatomy">
<h1>PENRA Courses</h1>
{% if not request.user.is_authenticated %}
<a href="{% url 'login'%}">Log in</a>
<a href="{% url 'login'%}">Log in</a><br/>
<a href="{% url 'password_reset'%}">Reset password</a>
{% else %}
<a href="{% url 'atlas:index'%}">Atlas</a>
@@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% load i18n %}.
{% block title %}Password change{% endblock %}
{% block content %}
<h1>Password changed</h1>
<p>{% translate 'Your password was changed.' %}</p>
{% endblock %}
@@ -0,0 +1,53 @@
<!-- templates/registration/password_reset_complete.html -->
{% extends 'base.html' %}
{% load i18n %}.
{% block title %}Password change{% endblock %}
{% block content %}<div id="content-main">
<h1>Password change</h1>
<form method="post">{% csrf_token %}
<div>
{% if form.errors %}
<p class="errornote">
{% if form.errors.items|length == 1 %}{% translate "Please correct the error below." %}{% else %}{% translate "Please correct the errors below." %}{% endif %}
</p>
{% endif %}
<p>{% translate 'Please enter your old password, for securitys sake, and then enter your new password twice so we can verify you typed it in correctly.' %}</p>
<fieldset class="module aligned wide">
<div class="form-row">
{{ form.old_password.errors }}
{{ form.old_password.label_tag }} {{ form.old_password }}
</div>
<div class="form-row">
{{ form.new_password1.errors }}
{{ form.new_password1.label_tag }} {{ form.new_password1 }}
{% if form.new_password1.help_text %}
<div class="help">{{ form.new_password1.help_text|safe }}</div>
{% endif %}
</div>
<div class="form-row">
{{ form.new_password2.errors }}
{{ form.new_password2.label_tag }} {{ form.new_password2 }}
{% if form.new_password2.help_text %}
<div class="help">{{ form.new_password2.help_text|safe }}</div>
{% endif %}
</div>
</fieldset>
<div class="submit-row">
<input type="submit" value="{% translate 'Change my password' %}" class="default">
</div>
</div>
</form></div>
{% endblock %}
@@ -1,5 +1,5 @@
<!-- templates/registration/password_reset_confirm.html -->
{% extends "base.html" %}
{% extends "../base.html" %}
{% block title %}Enter new password{% endblock %}
@@ -15,6 +15,7 @@
</form>
{% else %}
<h1>Invalid link</h1>
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>