PaperParser/app/blueprints/api/collections/templates/collections/create_form.j2

33 lines
888 B
Django/Jinja

<div id="collection-create-form" class="input-group has-validation">
<input
type="text"
{% if collections_error is defined %}
class="form-control is-invalid"
{% else %}
class="form-control"
{% endif %}
name="collection_name"
id="collection-name-input"
placeholder="Название базы"
aria-describedby="collection-feedback"
required
>
<button
type="submit"
class="btn btn-outline-primary"
hx-post="/api/collections"
hx-swap="outerHTML"
hx-target="#collection-create-form"
hx-indicator="#indicator"
>
Добавить
</button>
{% if collections_error is defined %}
<div id="collection-feedback" class="invalid-feedback">
{{ collections_error }}
</div>
{% endif %}
</div>