bookforge/templates/books/new.html

31 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2026-01-23 13:56:30 +01:00
{% extends "base.html" %}
{% import "components/typography.html" as typography %}
2026-01-28 00:38:24 +01:00
{% import "components/cards.html" as cards %}
2026-01-29 23:52:55 +01:00
{% import "components/inputs.html" as form_helpers %}
2026-01-23 13:56:30 +01:00
{% block main %}
2026-01-28 00:38:24 +01:00
{{ typography::heading("New book") }}
{% call cards::card() %}
<form method="post" action="/books">
2026-01-29 23:52:55 +01:00
{{ form_helpers::input("title", "Name", is_required = true, placeholder = "Ex: La Petite Dernière") }}
{{ form_helpers::input("authors", "Author(s)", is_required = true, placeholder = "Ex: Fatima Daas") }}
2026-01-28 00:38:24 +01:00
2026-01-29 23:52:55 +01:00
{% call(option) form_helpers::select("owner_id", "Owner", users, is_required = true) %}
<option value="{{ option.id }}">{{ option.name }}</option>
{% endcall %}
2026-01-28 00:38:24 +01:00
2026-01-29 23:52:55 +01:00
{% call(option) form_helpers::select("current_holder_id", "Current Holder", users, is_required = false) %}
<option value="{{ option.id }}">{{ option.name }}</option>
{% endcall %}
{{ form_helpers::textarea("description", "Description", rows = 5, is_required = false, placeholder = "Ex: Je mappelle Fatima Daas. Je suis la mazoziya, la petite dernière. Celle à laquelle on ne sest pas préparé. Française dorigine algérienne.") }}
2026-01-28 00:38:24 +01:00
2026-01-29 23:52:55 +01:00
{{ form_helpers::textarea("comment", "Comment", rows = 3, is_required = false, placeholder = "Ex: I recommend it, it's great!") }}
2026-01-28 00:38:24 +01:00
<div class="mt-4 text-center">
<input type="submit" value="Create book" class="btn btn-success">
</div>
</form>
{% endcall %}
{% endblock %}