mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-10 06:19:09 +00:00
fix user picture delete confirmation page
This commit is contained in:
@@ -4,15 +4,11 @@
|
||||
{% trans %}Delete confirmation{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% if is_fragment %}
|
||||
|
||||
{# Don't display tabs and errors #}
|
||||
{% block tabs %}
|
||||
{% endblock %}
|
||||
{% block errors %}
|
||||
{% endblock %}
|
||||
|
||||
{% endif %}
|
||||
{# Don't display tabs and errors #}
|
||||
{% block tabs %}
|
||||
{% endblock %}
|
||||
{% block errors %}
|
||||
{% endblock %}
|
||||
|
||||
{% block file %}
|
||||
<h2>{% trans %}Delete confirmation{% endtrans %}</h2>
|
||||
@@ -23,30 +19,32 @@
|
||||
{% set action = current %}
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ action }}" method="post">
|
||||
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
||||
<form
|
||||
method="post"
|
||||
{% if is_fragment %}
|
||||
hx-action="{{ action }}"
|
||||
hx-target="#content"
|
||||
hx-swap="innerHTML"
|
||||
{% else %}
|
||||
action="{{ action }}"
|
||||
{% endif %}
|
||||
>
|
||||
{% csrf_token %}
|
||||
|
||||
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
||||
<button
|
||||
{% if is_fragment %}
|
||||
hx-post="{{ action }}"
|
||||
hx-target="#content"
|
||||
hx-swap="innerHTML"
|
||||
{% endif %}
|
||||
>{% trans %}Confirm{% endtrans %}</button>
|
||||
|
||||
<button
|
||||
{% if is_fragment %}
|
||||
hx-get="{{ previous }}"
|
||||
hx-target="#content"
|
||||
hx-swap="innerHTML"
|
||||
{% else %}
|
||||
action="window.history.back()"
|
||||
{% endif %}
|
||||
>{% trans %}Cancel{% endtrans %}</button>
|
||||
|
||||
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
||||
</form>
|
||||
<form
|
||||
method="get"
|
||||
{% if is_fragment %}
|
||||
hx-action="{{ previous }}"
|
||||
hx-target="#content"
|
||||
hx-swap="innerHTML"
|
||||
{% else %}
|
||||
action="javascript:history.back();"
|
||||
{% endif %}
|
||||
>
|
||||
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user