vergabe-teilnahme/vergabe_teilnahme/templates/aufgaben/partials/aufgabe_form_inline.html

30 lines
1.1 KiB
HTML
Raw Normal View History

<form hx-post="{% url 'ausschreibungen:aufgaben:neu' ausschreibung.pk %}"
hx-target="#aufgaben-tbody"
hx-swap="afterbegin"
hx-on::after-request="if(event.detail.successful) this.reset(); document.getElementById('aufgaben-form-container').innerHTML = '';"
class="bg-slate-50 border border-slate-200 rounded p-3 mt-2">
{% csrf_token %}
<div class="flex gap-2 items-end flex-wrap">
<div class="flex-1 min-w-48">
<label class="form-label">Titel *</label>
{{ form.titel }}
</div>
<div class="w-32">
<label class="form-label">Typ</label>
{{ form.typ }}
</div>
<div class="w-36">
<label class="form-label">Phase</label>
{{ form.phase }}
</div>
<div class="flex gap-2 shrink-0">
<button type="submit" class="btn-primary text-xs">Speichern</button>
<button type="button" class="btn-ghost text-xs"
onclick="document.getElementById('aufgaben-form-container').innerHTML = ''">Abbrechen</button>
</div>
</div>
{% if form.titel.errors %}
<p class="text-red-600 text-xs mt-1">{{ form.titel.errors.0 }}</p>
{% endif %}
</form>