leilukin-tumbleblog/admin/pages/delete_group.twig

64 lines
1.9 KiB
Twig
Raw Normal View History

2024-06-20 14:10:42 +00:00
{% extends "layouts" ~ DIR ~ "default.twig" %}
{% block title %}{{ "Delete Group?" | translate }}{% endblock %}
{% block content %}
<h2>{{ "Delete Group?" | translate }}</h2>
<form class="delete split" action="{{ url('destroy_group') }}" method="post" accept-charset="UTF-8">
<fieldset role="presentation">
<p>
{{ "&#8220;%s&#8221; will be permanently deleted." | translate | format(group.name) }}
</p>
{% if group.users is not empty and groups is not empty %}
<p>
<label for="move_group">{{ "Move members to:" | translate }}</label>
{#- -#}
<select name="move_group" id="move_group">
{% for group in groups %}
<option value="{{ group.id }}"{{ group.id | selected(site.default_group) }}>
{{ group.name }}
</option>
{% endfor %}
</select>
</p>
{% endif %}
{% if group.id == site.default_group and groups is not empty %}
<p>
<label for="default_group">{{ "New default group:" | translate }}</label>
{#- -#}
<select name="default_group" id="default_group">
{% for group in groups %}
<option value="{{ group.id }}"{{ group.id | selected(site.guest_group) }}>
{{ group.name }}
</option>
{% endfor %}
</select>
</p>
{% endif %}
{% if group.id == site.guest_group and groups is not empty %}
<p>
<label for="guest_group">{{ "New &#8220;guest&#8221; group:" | translate }}</label>
{#- -#}
<select name="guest_group" id="guest_group">
{% for group in groups %}
<option value="{{ group.id }}"{{ group.id | selected(site.default_group) }}>
{{ group.name }}
</option>
{% endfor %}
</select>
</p>
{% endif %}
<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="{{ group.id }}" id="id">
<input type="hidden" name="hash" value="{{ authenticate() }}" id="hash">
</fieldset>
</form>
{% endblock %}