Add account deletion functionality with confirmation dialog and routing

This commit is contained in:
Edgar P. Burkhart 2025-06-15 11:31:07 +02:00
parent cd0ca2f5ea
commit 8faff47696
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
6 changed files with 46 additions and 13 deletions

View file

@ -7,6 +7,11 @@
{% for error in form.non_field_errors %}<article class="message error">{{ error }}</article>{% endfor %}
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
{% csrf_token %}
<fieldset>
<button type="submit" formaction="{% url "logout" %}" class="secondary">
<i class="ri-logout-box-r-fill"></i> Me déconnecter
</button>
</fieldset>
<fieldset>
{% if not user.youtubecredentials.credentials %}
<a href="{% url "youtube_login" %}" role="button"><i class="ri-youtube-fill"></i> Me connecter au compte Youtube</a>
@ -33,5 +38,8 @@
<fieldset>
<a href="{% url "password_change" %}" role="button" class="secondary">Changer mon mot de passe</a>
</fieldset>
<fieldset>
<a href="{% url "account_delete" %}" role="button" class="contrast">Supprimer mon compte</a>
</fieldset>
</form>
{% endblock content %}