Rajoute un message d'information et le retour renvoie sur la page d'où l'on vient (request.GET.next)

This commit is contained in:
Tom Hubrecht 2022-04-02 21:07:30 +02:00
parent e4e4cff9e6
commit d98d7da399

View file

@ -6,37 +6,51 @@
{% block content %} {% block content %}
<h1 class="title">{% trans "Connexion par mot de passe" %}</h1> <h1 class="title">{% trans "Connexion par mot de passe" %}</h1>
<hr> <hr>
<div class="columns is-centered"> <div class="columns is-centered">
<div class="column is-two-thirds"> <div class="column is-two-thirds">
<form action="" method="post">
{% csrf_token %}
{% include "forms/form.html" with errors=True %} <div class="tile is-ancestor py-3">
<div class="tile is-parent">
<div class="field is-grouped is-centered"> <div class="tile is-child notification is-primary is-light">
<div class="control is-expanded"> <div class="has-text-centered">
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit"> <span class="icon">
<span class="icon"> <i class="fas fa-info"></i>
<i class="fas fa-check"></i> </span>
</span> <span>{% trans "La connexion doit s'effectuer via les identifiants reçus par mail." %}</span>
<span>{% trans "Enregistrer" %}</span> </div>
</button> </div>
</div>
<div class="control">
<a class="button is-primary" href="{% url 'election.view' election_id %}">
<span class="icon">
<i class="fas fa-undo-alt"></i>
</span>
<span>{% trans "Retour" %}</span>
</a>
</div> </div>
</div> </div>
</form>
<form action="" method="post">
{% csrf_token %}
{% include "forms/form.html" with errors=True %}
<div class="field is-grouped is-centered">
<div class="control is-expanded">
<button class="button is-fullwidth is-outlined is-primary is-light" type="submit">
<span class="icon">
<i class="fas fa-check"></i>
</span>
<span>{% trans "Enregistrer" %}</span>
</button>
</div>
<div class="control">
<a class="button is-primary" href="{{ request.GET.next }}">
<span class="icon">
<i class="fas fa-undo-alt"></i>
</span>
<span>{% trans "Retour" %}</span>
</a>
</div>
</div>
</form>
</div>
</div> </div>
</div>
{% endblock %} {% endblock %}