extract album creation form into its own fragment

This commit is contained in:
imperosol
2025-03-29 18:19:05 +01:00
committed by Thomas Girod
parent 156305a16a
commit b83fbf91e1
6 changed files with 111 additions and 122 deletions

View File

@@ -0,0 +1,18 @@
<form
class="add-files"
hx-post="{{ url("sas:album_create") }}"
hx-disabled-elt="find input[type='submit']"
hx-swap="outerHTML"
>
{% csrf_token %}
<div class="inputs">
<div>
<label for="{{ form.name.id_for_label }}">{{ form.name.label }}</label>
{{ form.name }}
</div>
{{ form.parent }}
<input type="submit" value="{% trans %}Create{% endtrans %}" />
</div>
{{ form.non_field_errors() }}
{{ form.name.errors }}
</form>