45 lines
2.1 KiB
HTML
45 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% from "_erasure_summary.html" import erasure_summary %}
|
|
{% block title %}{{ _('Delete account') }} · {{ appearance.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="card narrow">
|
|
<h1>{{ _('Delete account') }}</h1>
|
|
{% if deleted %}
|
|
<p class="alert ok" role="status">{{ _('Your account has been deleted.') }}</p>
|
|
<p><a href="/">{{ _('To the start page') }}</a></p>
|
|
{% elif reauth %}
|
|
<p>{{ _('For your protection, please sign in again before deleting your account.') }}</p>
|
|
<form method="post" action="/logout" class="form">
|
|
{{ csrf_field(request) }}
|
|
<input type="hidden" name="next" value="/account/delete">
|
|
<button type="submit">{{ _('Sign in again') }}</button>
|
|
</form>
|
|
<p><a href="/account">{{ _('Cancel') }}</a></p>
|
|
{% else %}
|
|
{% if error %}<p class="alert error" role="alert">{{ _(error) }}</p>{% endif %}
|
|
<h2>{{ _('What happens') }}</h2>
|
|
{{ erasure_summary(summary, 'user') }}
|
|
<form method="post" action="/account/delete" class="form">
|
|
{{ csrf_field(request) }}
|
|
{% if summary.forms %}
|
|
<h2>{{ _('Your forms') }}</h2>
|
|
<p class="hint">{{ _('A form can be handed over to someone who edits it with you; otherwise it is deleted with all its answers.') }}</p>
|
|
{% for f in summary.forms %}
|
|
<label for="form_{{ f.public_id }}">{{ f.title }}</label>
|
|
<select id="form_{{ f.public_id }}" name="form_{{ f.public_id }}">
|
|
<option value="delete">{{ _('Delete with all answers') }}</option>
|
|
{% for u in candidates[f.id] %}
|
|
<option value="{{ u.public_id }}">{{ _('Hand over to %(name)s', name=u.display_name) }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% endfor %}
|
|
{% endif %}
|
|
<label class="check"><input type="checkbox" name="confirm" required> {{ _('I want to delete my account and understand that this cannot be undone.') }}</label>
|
|
<button type="submit" class="danger">{{ _('Delete account now') }}</button>
|
|
</form>
|
|
<p><a href="/account">{{ _('Cancel') }}</a></p>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|