Project

General

Profile

0001-password-change-related-pages-adapted-to-site-design.patch

Serghei Mihai, 18 September 2014 12:43 AM

Download (3.8 KB)

View differences:

Subject: [PATCH] password change related pages adapted to site design

Closes #5449
 calebasse/static/css/accounts.css                  | 17 ++++++++++
 .../registration/password_change_done.html         | 20 +++++++++++
 .../registration/password_change_form.html         | 39 ++++++++++++++++++++++
 3 files changed, 76 insertions(+)
 create mode 100644 calebasse/static/css/accounts.css
 create mode 100644 calebasse/templates/registration/password_change_done.html
 create mode 100644 calebasse/templates/registration/password_change_form.html
calebasse/static/css/accounts.css
#password_change label {
float: left;
width: 15em;
}
#password_change div.form-row {
margin: 1em 0;
}
.icon-warning:before {
content: "\f071";
color: orange;
}
ul.errorlist, ul.errorlist li {
display: inline;
}
calebasse/templates/registration/password_change_done.html
{% extends "calebasse/base.html" %}
{% load i18n %}
{% load i18n static %}
{% block extrastyles %}
<link rel="stylesheet" type="text/css" href="{% static "css/accounts.css" %}" />
{% endblock extrastyles %}
{% block appbar %}
<h2>{% trans 'Password change' %}</h2>
<a href="../../..">Retourner à l'accueil</a>
{% endblock %}
{% block title %}{% trans 'Password change successful' %}{% endblock %}
{% block content %}
<p>{% trans 'Your password was changed.' %}</p>
{% endblock %}
calebasse/templates/registration/password_change_form.html
{% extends "calebasse/base.html" %}
{% load i18n static %}
{% block extrastyles %}
<link rel="stylesheet" type="text/css" href="{% static "css/accounts.css" %}" />
{% endblock extrastyles %}
{% block title %}{% trans 'Password change' %}{% endblock %}
{% block appbar %}
<h2>{% trans 'Password change' %}</h2>
<a href="../..">Retourner à l'accueil</a>
{% endblock %}
{% block content %}
<div id="password_change">
<form method="post">{% csrf_token %}
<div>
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
{% if form.errors %}
<p class="icon-warning errornote">
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
</p>
{% endif %}
<div class="form-row">
<label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} {{ form.old_password.errors }}
</div>
<div class="form-row">
<label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} {{ form.new_password1.errors }}
</div>
<div class="form-row">
<label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} {{ form.new_password2.errors }}
</div>
<div class="submit-row">
<button>{% trans 'Change my password' %}</button>
</div>
</div>
</form>
</div>
{% endblock %}