This commit is contained in:
Ross
2025-12-05 13:53:08 +00:00
parent 94fd98a612
commit c71c229ea8
3 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<form method="post" enctype="multipart/form-data" action="{% url 'cards:edit' card.pk %}" hx-post="{% url 'cards:edit' card.pk %}" hx-target="#card-{{ card.pk }}" hx-swap="outerHTML">
{% else %}
{# Create: insert the returned card into the grid, and let the view also send an OOB form fragment to replace the form container when needed #}
<form method="post" enctype="multipart/form-data" action="{% url 'cards:create' %}" hx-post="{% url 'cards:create' %}" hx-target="#cards-list .grid" hx-swap="afterbegin">
<form method="post" enctype="multipart/form-data" action="{% url 'cards:create' %}" hx-post="{% url 'cards:create' %}" hx-target="#cards-list .columns" hx-swap="afterbegin">
{% endif %}
{% csrf_token %}
{{ form.non_field_errors }}
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
{% if card %}
<form method="post" enctype="multipart/form-data" action="{% url 'cards:edit' card.pk %}" hx-post="{% url 'cards:edit' card.pk %}" hx-target="#card-{{ card.pk }}" hx-swap="outerHTML">
{% else %}
<form method="post" enctype="multipart/form-data" action="{% url 'cards:create' %}" hx-post="{% url 'cards:create' %}" hx-target="#cards-list .grid" hx-swap="afterbegin">
<form method="post" enctype="multipart/form-data" action="{% url 'cards:create' %}" hx-post="{% url 'cards:create' %}" hx-target="#cards-list .columns" hx-swap="afterbegin">
{% endif %}
{% csrf_token %}
{{ form.non_field_errors }}