leilukin-tumbleblog/admin/pages/delete_user.twig

58 lines
1.7 KiB
Twig
Raw Normal View History

2024-06-20 14:10:42 +00:00
{% extends "layouts" ~ DIR ~ "default.twig" %}
{% block title %}{{ "Delete User?" | translate }}{% endblock %}
{% block content %}
<h2>{{ "Delete User?" | translate }}</h2>
<form class="delete split" action="{{ url('destroy_user') }}" method="post" accept-charset="UTF-8">
<fieldset role="presentation">
<p>
{{ "&#8220;%s&#8221; will be permanently deleted." | translate | format(user.login) }}
</p>
{% if user.posts is not empty %}
<p>
<label for="move_posts">{{ "Attribute posts to:" | translate }}</label>
{#- -#}
<select name="move_posts" id="move_posts">
<option value="0">{{ "[Delete Posts]" | translate }}</option>
{% if users is not empty %}
{% for user in users %}
<option value="{{ user.id }}">
{{ user.full_name is not empty ? user.full_name ~ " (" ~ user.login ~ ")" : user.login }}
</option>
{% endfor %}
{% endif %}
</select>
</p>
{% endif %}
{% if user.pages is not empty %}
<p>
<label for="move_pages">{{ "Attribute pages to:" | translate }}</label>
{#- -#}
<select name="move_pages" id="move_pages">
<option value="0">{{ "[Delete Pages]" | translate }}</option>
{% if users is not empty %}
{% for user in users %}
<option value="{{ user.id }}">
{{ user.full_name is not empty ? user.full_name ~ " (" ~ user.login ~ ")" : user.login }}
</option>
{% endfor %}
{% endif %}
</select>
</p>
{% endif %}
{{ trigger.call("delete_user_form") }}
<div class="confirmation">
<button name="destroy" value="indubitably" class="boo">
{{ "Delete!" | translate }}
</button>
<button name="destroy" value="undecidedly" type="submit" class="yay">
{{ "Cancel" | translate }}
</button>
</div>
<input type="hidden" name="id" value="{{ user.id }}" id="id">
<input type="hidden" name="hash" value="{{ authenticate() }}" id="hash">
</fieldset>
</form>
{% endblock %}