mirror of
https://github.com/ae-utbm/sith.git
synced 2026-09-12 07:19:08 +00:00
inline deletion submit buttons on fragment
This commit is contained in:
@@ -20,31 +20,35 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
<p>{% trans obj=object %}Are you sure you want to delete "{{ obj }}"?{% endtrans %}</p>
|
||||||
<form
|
<div class="row gap">
|
||||||
method="post"
|
<form
|
||||||
{% if is_fragment %}
|
style="margin-right: 0"
|
||||||
hx-action="{{ action }}"
|
method="post"
|
||||||
hx-target="#content"
|
{% if is_fragment %}
|
||||||
hx-swap="innerHTML"
|
hx-action="{{ action }}"
|
||||||
{% else %}
|
hx-target="#content"
|
||||||
action="{{ action }}"
|
hx-swap="innerHTML"
|
||||||
{% endif %}
|
{% else %}
|
||||||
>
|
action="{{ action }}"
|
||||||
{% csrf_token %}
|
{% endif %}
|
||||||
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
>
|
||||||
</form>
|
{% csrf_token %}
|
||||||
<form
|
<input type="submit" value="{% trans %}Confirm{% endtrans %}" />
|
||||||
method="get"
|
</form>
|
||||||
{% if is_fragment %}
|
<form
|
||||||
hx-action="{{ previous }}"
|
style="margin-left: 0"
|
||||||
hx-target="#content"
|
method="get"
|
||||||
hx-swap="innerHTML"
|
{% if is_fragment %}
|
||||||
{% else %}
|
hx-action="{{ previous }}"
|
||||||
action="javascript:history.back();"
|
hx-target="#content"
|
||||||
{% endif %}
|
hx-swap="innerHTML"
|
||||||
>
|
{% else %}
|
||||||
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
action="javascript:history.back();"
|
||||||
</form>
|
{% endif %}
|
||||||
|
>
|
||||||
|
<input type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user