Skip to content

Commit

Permalink
Password change/reset templates
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed Sep 17, 2010
1 parent aaf6263 commit cdd51b1
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 3 deletions.
4 changes: 3 additions & 1 deletion templates/registration/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<h1>Login</h1>
<form method="post" action="">
{% csrf_token %}
{{ form.as_ul }}
<ul>
{{ form.as_ul }}
</ul>
<input type="submit" name="submit" value="Login" />
</form>
{% endblock content %}
5 changes: 5 additions & 0 deletions templates/registration/password_change_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "base.html" %}

{% block content %}
<h1>Password change successful!</h1>
{% endblock %}
17 changes: 17 additions & 0 deletions templates/registration/password_change_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "base.html" %}

{% block content %}
<h1>Password change</h1>
{% if form.errors %}
<ul class="errorlist">
<li>Please fix the errors and submit again.</li>
</ul>
{% endif %}
<form method="post" action="">
{% csrf_token %}
<ul>
{{ form.as_ul }}
</ul>
<input type="submit" class="btn post" value="Change my password" />
</form>
{% endblock %}
6 changes: 6 additions & 0 deletions templates/registration/password_reset_complete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "base.html" %}

{% block content %}
<h1>Password reset complete</h1>
<p>Your password has been set. You may go ahead and <a href="{% url auth_login %}">login</a> now.</p>
{% endblock %}
24 changes: 24 additions & 0 deletions templates/registration/password_reset_confirm.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends "base.html" %}

{% block content %}
<h1>Password reset - new password</h1>
{% if validlink %}
{% if form.errors %}
<ul class="errorlist">
<li>Please fix the errors and submit again.</li>
</ul>
{% endif %}
<form method="post" action="">
{% csrf_token %}
<ul>
{{ form.as_ul }}
</ul>
<input type="submit" class="btn post" value="Change my password" />
</form>
{% else %}
<p>
The password reset link was invalid, possibly because it has already been used.
Please <a href="{% url auth_password_reset %}">request a new password reset</a>.
</p>
{% endif %}
{% endblock %}
6 changes: 6 additions & 0 deletions templates/registration/password_reset_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "base.html" %}

{% block content %}
<h1>Password reset</h1>
<p>Please check your e-mail for further instructions on resetting your password.</p>
{% endblock %}
10 changes: 10 additions & 0 deletions templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
You're receiving this e-mail because you requested a password reset
for your user account on {{ site_name }}.

Please go to the following page and choose a new password:

{% block reset_link %}
https://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %}
{% endblock %}

Your username, in case you've forgotten: {{ user.username }}
18 changes: 18 additions & 0 deletions templates/registration/password_reset_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "base.html" %}

{% block content %}
<h1>Password reset</h1>
<p>Forgot your password? Enter your e-mail address below, and we&rsquo;ll reset your password and e-mail the new one to you.</p>
{% if form.errors %}
<ul class="errorlist">
<li>Please fix the errors and submit again.</li>
</ul>
{% endif %}
<form method="post" action="">
{% csrf_token %}
<ul>
{{ form.as_ul }}
</ul>
<input type="submit" class="btn post" value="Reset my password" />
</form>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/registration/registration_complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ <h1>registration successful</h1>
An e-mail has been sent to the address that you entered,
so please check your e-mail and activate your account at this time.
</p>
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/registration/registration_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ <h1>Register</h1>
</ol>
<input type="submit" class="btn post" value="Register" />
</form>
{% endblock %}
{% endblock %}

0 comments on commit cdd51b1

Please sign in to comment.