revamp authentic pages to be more neutral (#12560)

This commit is contained in:
Frédéric Péters 2016-07-16 10:00:29 +02:00
parent 06d7f0b9b6
commit 8bd5a99797
18 changed files with 41 additions and 329 deletions

View File

@ -1,4 +1,4 @@
{% extends "authentic2/base.html" %}
{% extends "authentic2/base-page.html" %}
{% load i18n staticfiles %}
{% block extra_styles %}
@ -80,4 +80,3 @@ Gestion du compte
</div>
<br class="clear" />
{% endblock %}

View File

@ -1,30 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Gestion du compte</h2>
<div id="welcome">
<h3>Suppression du compte</h3>
<div class="right">
<form method="post" action=".">
{% csrf_token %}
<p>
Si vous cliquez sur le bouton "confirmer" toutes vos données concernant les
eservices seront effacées et vous ne pourrez plus les récupérer.
</p>
{{ form.as_p }}
<input type="submit" name="submit" value="Confirmer" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
</form>
</div>
</div>
<br class="clear"/>
{% endblock %}

View File

@ -0,0 +1,21 @@
{% extends "authentic2/base.html" %}
{% block extra-body-class %}authentic-page{% endblock %}
{% block placeholder-content %}
<div id="welcome">
<h3>Compte usager de<br/>
Montpellier Méditerranée Métropole<br/>
et de ses 31 communes</h3>
</div>
<div class="a2-block">
{% block content %}
{% endblock %}
</div>
<br class="clear">
<p id="help">
<a href="{% firstof help_url 'https://compte-citoyen.montpellier3m.fr/aide/' %}">Contacter le support pour l'aide</a>
</p>
{% endblock %}

View File

@ -1,11 +0,0 @@
{% load i18n %}
<form method="post" class="{% if form.non_field_errors %}form-with-errors {% endif %}">
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" {% if submit_name %}name="{{ submit_name }}"{% endif %}
value="{% if submit_value %}{{ submit_value }}{% else %}{% trans 'Submit' %}{% endif %}" />
{% if not no_cancel_button %}
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
{% endif %}
</form>

View File

@ -1,14 +0,0 @@
{{ form.non_field_errors }}
{% for field in form.visible_fields %}
<div id="id_{{ field.html_name }}_wrap" class="{% if field.field.required %} form-field-required{% endif %}{% if field.errors %} form-field-error{% endif %}">
{{ field.errors }}
<label for="id_{{ field.html_name }}">{{ field.label }}&nbsp;:</label>
{{ field }}
{% if field.help_text %}
<p id="id_{{ field.html_name }}_help_text" class="help-text">{{ field.help_text }}</p>
{% endif %}
</div>
{% endfor %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}

View File

@ -1,25 +1,11 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% load staticfiles %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
<h3>Connexion</h3>
</div>
<div class="right">
<div id="login-blocks">
{% for name, content in methods %}
{% if not forloop.first %}
<div class="textbreak"><span>OU</span></div>
{% endif %}
{{ content|safe }}
<div>{{ content|safe }}</div>
{% endfor %}
</div>
<br class="clear"/>
{% endblock %}

View File

@ -1,18 +0,0 @@
{% load i18n %}
<div>
<form method="post" action="">
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" name="{{ submit_name }}" value="{% trans "Log in" %}"/>
</form>
</div>
<div class="login-actions">
{% if can_reset_password %}
<p><a href="{% url 'auth_password_reset' %}">Réinitialiser votre mot de passe</a></p>
{% endif %}
{% if registration_authorized %}
<p><a href="{% url 'registration_register' %}{% if request.GET.next %}?next={{ request.GET.next|urlencode }}{% endif %}">Créer un compte</a></p>
{% endif %}
<p><a href="{{ agglo_url }}nous-contacter/">Contacter le support pour l'aide</a></p>
</div>

View File

@ -1,25 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Gestion du compte</h2>
<div id="welcome">
<h3>Modification de votre profil</h3>
</div>
<div class="right">
<form method="post">
{% csrf_token %}
<div>
{{ form.as_p }}
</div>
{% if form.instance and form.instance.id %}
<input type="submit" value="{% trans "Modify" %}"/>
{% else %}
<input type="submit" value="{% trans "Create" %}"/>
{% endif %}
</form>
</div>
<br class="clear" />
{% endblock %}

View File

@ -1,29 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Gestion du compte</h2>
<div id="welcome">
<h3>{% trans "Email change" %}</h3>
<div class="right">
<form method="post" action="." class="password_change_form">
<p>
Le changement de votre adresse de courriel nécessite une validation par
courriel. Un lien va vous être envoyé par courriel. Vous devez cliquer sur ce
lien pour valider le changement d'adresse de courriel.
</p>
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" value="{% trans 'Submit' %}" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
</form>
</div>
</div>
{% endblock %}

View File

@ -1,13 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</div>
<div id="welcome">
<h3>{% trans "Your account is now activated" %}</h3>
<p><button type="button" onclick="location.href = '/'">{% trans "Back" %}</button></p>
</div>
{% endblock %}

View File

@ -1,32 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Gestion du compte</h2>
<div id="welcome">
<h3>{% trans "Change password" %}</h3>
</div>
<div class="right">
<form method="post" action="." class="password_change_form">
<p>
Pour modifier votre mot de passe vous devez saisir votre mot de passe actuel
puis votre nouveau mot de passe à deux reprises. Attention de saisir votre
nouveau mot de passe à l'identique dans les deux zones texte prévues à cet
effet.
</p>
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" value="{% trans 'Submit' %}" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
</form>
</div>
<br class="clear"/>
{% endblock %}

View File

@ -1,22 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
<h3>{% trans "Password reset successfully" %}</h3>
<p>
Votre mot de passe a été modifié avec succès. Vous pouvez à présent utiliser
votre nouveau mot de passe pour vous connecter.
</p>
<p><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></p>
</div>
<br class="clear"/>
{% endblock %}

View File

@ -1,40 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
{% if validlink %}
<h3>{% trans "Resetting password" %}</h3>
<div class="right">
<form method="post" action=".">
<p>
Veuillez saisir votre nouveau mot de passe et le confirmer en le saisissant une
nouvelle fois à l'identique.
</p>
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" value="{% trans 'Submit' %}" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
</form>
{% else %}
<p>{% trans "Password reset failed" %}</p>
{% endif %}
</div>
<br class="clear"/>
{% endblock %}

View File

@ -1,15 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div>
<h3>{% trans "Resetting password" %}</h3>
<p>{% trans "Email with password reset instructions has been sent." %}</p>
<p><button type="button" onclick="location.href = '/'">{% trans "Back" %}</button></p>
</div>
<br class="clear" />
{% endblock %}

View File

@ -1,31 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
<h3>{% trans "Resetting password" %}</h3>
<div class="right">
<form method="post">
<p>
Si vous avez égaré votre mot de passe et que vous souhaitez pouvoir vous
connecter à nouveau indiquez votre adresse électronique. Vous recevrez un
courriel vous permettant de définir un nouveau mot de passe.
</p>
{% csrf_token %}
{% include "authentic2/form_fields.html" with form=form %}
<input type="submit" value="{% trans 'Submit' %}" />
<button type="button" onclick="location.href = '/'">{% trans "Back" %}</button>
</form>
</div>
</div>
<br class="clear"/>
{% endblock %}

View File

@ -1,14 +0,0 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
<h3>{% trans "Successful registration" %}</h3>
<p>{% trans "Thank you for registering. Activation email sent." %}</p>
<p><button type="button" onclick="location.href = '/'">{% trans "Back" %}</button></p>
</div>
<br class="clear" />
{% endblock %}

View File

@ -1 +0,0 @@
{% include "registration/registration_form.html" %}

View File

@ -1,27 +1,28 @@
{% extends "authentic2/base-page.html" %}
{% load i18n %}
{% block extra-body-class %}narrow-page{% endblock %}
{% block content %}
<h2 class="single-title">Compte citoyen</h2>
<div id="welcome">
<h3>Création de votre compte</h3>
</div>
<div class="right">
<div id="frontend-registration-email">
{% include 'authentic2/form.html' with form=form %}
<div id="registration-blocks">
<div>
<p>
Après validation de votre adresse électronique, il vous sera envoyé un courriel
pour ouvrir votre compte.
</p>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Submit' %}" />
</form>
</div>
{% for id, block in frontends.items %}
<div>
{{ block.content|safe }}
</div>
{% endfor %}
</div>
{% if frontends.fc %}
<div class="textbreak"><span>OU</span></div>
<div id="frontend-registration-fc">
{{ frontends.fc.content|safe }}
</div>
{% endif %}
</div>
<br class="clear"/>
{% endblock %}