bookforge/templates/books/new.html

31 lines
1.6 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-30 18:23:54 +01:00
{{ typography::heading(t!("book.new.title")) }}
2026-01-28 00:38:24 +01:00
{% call cards::card() %}
<form method="post" action="/books">
2026-01-30 18:23:54 +01:00
{{ form_helpers::input("title", t!("book.attributes.title"), is_required = true, placeholder = "Ex: La Petite Dernière") }}
{{ form_helpers::input("authors", t!("book.attributes.authors"), is_required = true, placeholder = "Ex: Fatima Daas") }}
2026-01-28 00:38:24 +01:00
2026-01-30 18:23:54 +01:00
{% call(option) form_helpers::select("owner_id", t!("book.attributes.owner"), users, is_required = true) %}
2026-01-29 23:52:55 +01:00
<option value="{{ option.id }}">{{ option.name }}</option>
{% endcall %}
2026-01-28 00:38:24 +01:00
2026-01-30 18:23:54 +01:00
{% call(option) form_helpers::select("current_holder_id", t!("book.attributes.current_holder"), users, is_required = false) %}
2026-01-29 23:52:55 +01:00
<option value="{{ option.id }}">{{ option.name }}</option>
{% endcall %}
2026-01-28 00:38:24 +01:00
2026-01-30 18:23:54 +01:00
{{ form_helpers::textarea("description", t!("book.attributes.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.") }}
{{ form_helpers::textarea("comment", t!("book.attributes.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">
2026-01-30 18:23:54 +01:00
<input type="submit" value='{{ t!("book.new.button") }}' class="btn btn-success">
2026-01-28 00:38:24 +01:00
</div>
</form>
{% endcall %}
{% endblock %}