Add router

This commit is contained in:
gabatxo1312 2026-01-31 18:21:28 +01:00
commit 8c94eb5252
No known key found for this signature in database
19 changed files with 106 additions and 67 deletions

View file

@ -10,7 +10,7 @@
{{ typography::heading(t!("book.edit.title")) }}
{% call cards::card() %}
<form method="post" action="/books/{{ book.id }}">
<form method="post" action="{{ router.update_book_path(&book.id) }}">
<div class="mb-3">
<label class="form-label" for="title">{{ t!("book.attributes.title") }}</label>
<input type="text" name="title" class="form-control" value="{{ book.title }}" required>

View file

@ -11,7 +11,7 @@
{{ typography::heading(t!("book.new.title")) }}
{% call cards::card() %}
<form method="post" action="/books">
<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") }}