generated from coulomb/repo-seed
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
<form hx-post="{% url 'ausschreibungen:lose:neu' ausschreibung.pk %}"
|
|
hx-target="#lose-tbody"
|
|
hx-swap="afterbegin"
|
|
hx-on::after-request="if(event.detail.successful) this.reset(); document.getElementById('lose-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-none w-20">
|
|
<label class="form-label">Nr.</label>
|
|
{{ form.losnummer }}
|
|
</div>
|
|
<div class="flex-1 min-w-40">
|
|
<label class="form-label">Titel *</label>
|
|
{{ form.lostitel }}
|
|
</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('lose-form-container').innerHTML = ''">Abbrechen</button>
|
|
</div>
|
|
</div>
|
|
{% if form.losnummer.errors or form.lostitel.errors %}
|
|
<p class="text-red-600 text-xs mt-1">
|
|
{{ form.losnummer.errors.0 }}{{ form.lostitel.errors.0 }}
|
|
</p>
|
|
{% endif %}
|
|
</form>
|