add confirm before email deletion

This commit is contained in:
Grégory Lebreton 2025-05-26 16:10:13 +02:00
parent 26407664e7
commit 5d0d5532aa
2 changed files with 8 additions and 2 deletions

View File

@ -9,7 +9,7 @@
{% endblock %}
<hr>
<div>
<img src="/static/img/logo.png" alt="Logo" style="height: 50px;">
<img src="{{ url_for('static', filename='img/logo.png') }}" alt="Logo" style="height: 50px;">
</div>
</body>
</html>

View File

@ -36,7 +36,7 @@
</form>
<h3>Supprimer boîte mail</h3>
<form method="post">
<form method="post" onsubmit="return confirmDeleteMailbox();">
{{ delete_form.hidden_tag() }}
{{ delete_form.email.label }} {{ delete_form.email }}<br>
{{ delete_form.submit }}
@ -64,4 +64,10 @@
<hr>
<a href="{{ url_for('logout') }}">Logout</a>
<script>
function confirmDeleteMailbox() {
return confirm("Êtes-vous sûr de vouloir supprimer cette boîte mail ?");
}
</script>
{% endblock %}