contentdb/app/templates/users/delete.html

45 lines
1.6 KiB
HTML
Raw Normal View History

2020-12-09 20:33:31 +01:00
{% extends "base.html" %}
{% block title %}
2022-01-08 00:27:00 +01:00
{{ _("Delete user %(username)s", username=user.username) }}
2020-12-09 20:33:31 +01:00
{% endblock %}
{% block content %}
<form method="POST" action="" class="card box_grey">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<h3 class="card-header">{{ self.title() }}</h3>
<div class="card-body">
2022-01-08 00:27:00 +01:00
<p><b>{{ _("Deleting is permanent") }}</b></p>
2020-12-09 20:33:31 +01:00
{% if can_delete %}
<p>
{{ _("This will delete your account, removing %(threads)d threads and %(replies)d replies.",
threads=user.threads.count(), replies=user.replies.count()) }}
</p>
2020-12-10 00:59:01 +01:00
{% else %}
2020-12-09 20:33:31 +01:00
<p>
2020-12-10 00:59:01 +01:00
{{ _("As you have packages and/or forum threads, your account cannot be fully deleted.") }}
2020-12-09 20:33:31 +01:00
{{ _("Instead, your account will be deactivated and all personal information wiped - including %(threads)d threads and %(replies)d replies.",
threads=user.threads.count(), replies=user.replies.count()) }}
2020-12-10 00:59:01 +01:00
{{ _("See the privacy policy for more information.") }}
2020-12-09 20:33:31 +01:00
</p>
{% endif %}
2022-01-08 00:27:00 +01:00
<a class="btn btn-secondary mr-3" href="{{ url_for('users.account', username=user.username) }}">
{{ _("Cancel") }}
</a>
<input type="submit"
{% if can_delete %}
2022-01-08 00:27:00 +01:00
name="delete" value="{{ _('Delete') }}"
{% else %}
2022-01-08 00:27:00 +01:00
name="deactivate" value="{{ _('Deactivate') }}"
{% endif %}
class="btn btn-danger" />
{% if not can_delete and current_user.rank.atLeast(current_user.rank.ADMIN) %}
2022-01-08 00:27:00 +01:00
<input type="submit" name="delete" value="{{ _('Delete Anyway') }}" class="btn btn-danger ml-3" />
{% endif %}
2020-12-09 20:33:31 +01:00
</div>
</form>
{% endblock %}