Skip to content

Commit

Permalink
feat: attribute these to #2, dressing up "change password" pages
Browse files Browse the repository at this point in the history
  • Loading branch information
erictheise committed Mar 18, 2020
1 parent 76954c8 commit 0960f4f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 1 deletion.
3 changes: 2 additions & 1 deletion maps/templates/maps/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ <h1><span class="pc-ff--sans pc-fw--normal">Platform Co-op</span><br/> Directory
<p class="subhead">Subhead.</p>
</div>
{% include 'maps/search.html' %}
<div id="foo">{{ user.first_name }}</div>
<div id="foo">Hello {{ user.first_name }}</div>
<a href="{% url 'account_change_password' %}">Change password</a>
{% endblock %}
13 changes: 13 additions & 0 deletions templates/account/email/password_reset_key_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% load i18n %}{% autoescape off %}{% blocktrans %}

You're receiving this e-mail because you or someone else has requested a password for your user account.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}

{{ password_reset_url }}

Platform Cooperativism Consortium
The New School
79 Fifth Avenue, 1601
New York, New York
10003
{% endautoescape %}
4 changes: 4 additions & 0 deletions templates/account/email/password_reset_key_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password reset request for your Platform Coop account{% endblocktrans %}
{% endautoescape %}
20 changes: 20 additions & 0 deletions templates/account/password_change.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% extends "account/base.html" %}
{% load i18n %}

{% block title %}{% trans "Change Password" %}{% endblock %}

{% block content %}
<div class="page-header">
<p><a class="link--inverse" href="{% url 'index' %}">Home</a></p>
<h1>{% trans "Change Password" %}</h1>
</div>

<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
{% csrf_token %}
{{ form.as_p }}
<div class="spacer"></div>
<button id="button" type="submit" class="button">
<span class="button__label">{% trans "Change Password" %}</span>
</button>
</form>
{% endblock %}
18 changes: 18 additions & 0 deletions templates/account/password_reset_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load account %}

{% block title %}{% trans "Password Reset" %}{% endblock %}

{% block content %}
<div class="page-header">
<p><a class="link--inverse" href="{% url 'index' %}">Home</a></p>
<h1>{% trans "Password Reset" %}</h1>
</div>

{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}

<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
{% endblock %}
29 changes: 29 additions & 0 deletions templates/account/password_reset_from_key.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "account/base.html" %}
{% load i18n %}

{% block title %}{% trans "Change Password" %}{% endblock %}

{% block content %}
<div class="page-header">
<p><a class="link--inverse" href="{% url 'index' %}">Home</a></p>
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
</div>

{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
{% else %}
{% if form %}
<form method="POST" action="{{ action_url }}">
{% csrf_token %}
{{ form.as_p }}
<div class="spacer"></div>
<button id="button" type="submit" class="button">
<span class="button__label">{% trans "Change Password" %}</span>
</button>
</form>
{% else %}
<p>{% trans 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
{% endblock %}
13 changes: 13 additions & 0 deletions templates/account/password_reset_from_key_done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends "account/base.html" %}

{% load i18n %}
{% block title %}{% trans "Change Password" %}{% endblock %}

{% block content %}
<div class="page-header">
<p><a class="link--inverse" href="{% url 'index' %}">Home</a></p>
<h1>{% trans "Change Password" %}</h1>
</div>

<p>{% trans 'Your password is now changed.' %}</p>
{% endblock %}

0 comments on commit 0960f4f

Please sign in to comment.