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

@ -11,7 +11,7 @@
{{ typography::heading(t!("user.edit.title")) }}
{% call cards::card() %}
<form action="/users/{{ user.id }}" method="post">
<form action="{{ router.update_user_path(&user.id) }}" method="post">
<div class="row align-items-end">
<div class="col-md-10">
{{ form_helpers::input("name", t!("user.attributes.name"), value = user.name, is_required = true, placeholder = "Ex: Kropotkine", margin_bottom = false) }}

View file

@ -10,7 +10,7 @@
{% block main %}
{% call typography::heading(t!("user.index.title")) %}
<a class="btn-success btn" href="/users/new">{{ t!("user.index.button") }}</a>
<a class="btn-success btn" href="{{ router.new_user_path() }}">{{ t!("user.index.button") }}</a>
{% endcall %}
{% call cards::card() %}
@ -42,7 +42,7 @@
<div class="d-flex flex-column align-items-center justify-content-center">
<h2>{{ t!("common.no_result") }}</h2>
<a class="btn btn-success text-white text-nowrap mt-3" href="//new">
<a class="btn btn-success text-white text-nowrap mt-3" href="{{ router.new_user_path() }}">
{{ t!("user.index.button") }}
</a>
</div>

View file

@ -11,7 +11,7 @@
{{ typography::heading(t!("user.new.title")) }}
{% call cards::card() %}
<form action="/users" method="post">
<form action="{{ router.create_user_path() }}" method="post">
<div class="row align-items-end">
<div class="col-md-10">
{{ form_helpers::input("name", t!("user.attributes.name"), is_required = true, placeholder = "Ex: Kropotkine", margin_bottom = false) }}