Commit 8232a2f6 authored by fred's avatar fred

add password management forms

parent 17d5b288
......@@ -278,6 +278,18 @@ form#login-form ul.errorlist {
font-weight: normal;
}
.form-row {
margin: 1em 0;
}
.form-row label {
display: block;
}
.form-row input {
margin-left: 10px;
}
div#content h4 {
margin-bottom: 5px;
margin-top: 30px;
......
......@@ -39,6 +39,8 @@
<div id="splash">
<div id="user-links">
{% block user-links %}
<a href="{% url 'auth_password_change' %}">Changement de mot de passe</a>
|
<a href="{% url 'logout' %}">Déconnexion</a>
{% endblock %}
</div>
......
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2>{% trans 'Password change successful' %}</h2>
<p>{% trans 'Your password was changed.' %}</p>
<p><a href="{% url 'home' %}">Retourner sur la page d'accueil</a></p>
{% endblock %}
{% extends "base.html" %}
{% load i18n static %}
{% block content %}<div id="content-main">
<h2>{% trans 'Password change' %}</h2>
<form action="" method="post">{% csrf_token %}
<div>
{% if form.errors %}
<p class="errornote">
{% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
</p>
{% endif %}
<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>
<fieldset class="module aligned wide">
<div class="form-row">
{{ form.old_password.errors }}
<label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }}
</div>
<div class="form-row">
{{ form.new_password1.errors }}
<label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }}
</div>
<div class="form-row">
{{ form.new_password2.errors }}
<label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }}
</div>
</fieldset>
<div class="submit-row">
<input type="submit" value="{% trans 'Change my password' %}" class="default" />
</div>
<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
</div>
</form></div>
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2>{% trans 'Password reset complete' %}</h2>
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% if validlink %}
<h2>{% trans 'Enter new password' %}</h2>
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
<form action="" method="post">{% csrf_token %}
{{ form.new_password1.errors }}
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
{{ form.new_password2.errors }}
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
</form>
{% else %}
<h2>{% trans 'Password reset unsuccessful' %}</h2>
<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
{% endblock %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2>{% trans 'Password reset successful' %}</h2>
<p>{% trans "We've emailed you instructions for setting your password to the email address you submitted. You should be receiving it shortly." %}</p>
{% endblock %}
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }}
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
{% endautoescape %}
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2>{% trans "Password reset" %}</h2>
<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
<form action="" method="post">{% csrf_token %}
{{ form.email.errors }}
<p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
</form>
{% endblock %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment