Rafraîchit automatiquement pendant l'envoi du mail

This commit is contained in:
Tom Hubrecht 2021-08-20 12:12:15 +02:00
parent 2396c163bd
commit b55d398bf8

View file

@ -3,6 +3,11 @@
{% block extra_head %} {% block extra_head %}
{# Pendant l'envoi on rafraîchit automatiquement #}
{% if election.sent_mail is None %}
<meta http-equiv="refresh" content="20">
{% endif %}
<script> <script>
{% if not election.sent_mail %} {% if not election.sent_mail %}
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
@ -117,37 +122,39 @@
<hr> <hr>
<div class="columns is-centered"> <div class="columns is-centered">
<div class="column is-two-thirds"> <div class="column is-narrow">
<table class="table is-fullwidth is-bordered is-striped has-text-centered"> <div class="table-container">
<thead> <table class="table is-fullwidth is-bordered is-striped has-text-centered">
<tr> <thead>
<th>{% trans "Login" %}</th> <tr>
<th>{% trans "Nom" %}</th> <th>{% trans "Login" %}</th>
<th>{% trans "Email" %}</th> <th>{% trans "Nom" %}</th>
</tr> <th>{% trans "Email" %}</th>
</thead> </tr>
</thead>
<tbody> <tbody>
{% for v in voters %} {% for v in voters %}
<tr> <tr>
<td>{{ v.base_username }}</td> <td>{{ v.base_username }}</td>
<td>{{ v.full_name }}</td> <td>{{ v.full_name }}</td>
<td> <td>
{{ v.email }} {{ v.email }}
{% if v.has_valid_email %} {% if v.has_valid_email %}
<span class="icon has-text-success is-pulled-right"> <span class="icon has-text-success is-pulled-right">
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</span> </span>
{% elif v.has_valid_email is False %} {% elif v.has_valid_email is False %}
<span class="icon has-text-danger is-pulled-right"> <span class="icon has-text-danger is-pulled-right">
<i class="fas fa-times"></i> <i class="fas fa-times"></i>
</span> </span>
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
{% endif %} {% endif %}