36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
||
{% import "components/typography.html" as typography %}
|
||
{% import "components/cards.html" as cards %}
|
||
{% import "components/inputs.html" as form_helpers %}
|
||
|
||
{% block title %}
|
||
{{ t!("book.new.title_tag") }}
|
||
{% endblock %}
|
||
|
||
{% block main %}
|
||
{{ typography::heading(t!("book.new.title")) }}
|
||
|
||
{% call cards::card() %}
|
||
<form method="post" action="{{ router.create_book_path() }}">
|
||
{{ 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") }}
|
||
|
||
{% call(option) form_helpers::select("owner_id", t!("book.attributes.owner"), users, is_required = true) %}
|
||
<option value="{{ option.id }}">{{ option.name }}</option>
|
||
{% endcall %}
|
||
|
||
{% call(option) form_helpers::select("current_holder_id", t!("book.attributes.current_holder"), users, is_required = false) %}
|
||
<option value="{{ option.id }}">{{ option.name }}</option>
|
||
{% endcall %}
|
||
|
||
{{ form_helpers::textarea("description", t!("book.attributes.description"), rows = 5, is_required = false, placeholder = "Ex: Je m’appelle Fatima Daas. Je suis la mazoziya, la petite dernière. Celle à laquelle on ne s’est pas préparé. Française d’origine algérienne.") }}
|
||
|
||
{{ form_helpers::textarea("comment", t!("book.attributes.comment"), rows = 3, is_required = false, placeholder = "Ex: I recommend it, it's great!") }}
|
||
|
||
<div class="mt-4 text-center">
|
||
<input type="submit" value='{{ t!("book.new.button") }}' class="btn btn-success">
|
||
</div>
|
||
</form>
|
||
{% endcall %}
|
||
{% endblock %}
|