Add router
This commit is contained in:
parent
f6d4e7c556
commit
8c94eb5252
19 changed files with 106 additions and 67 deletions
|
|
@ -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) }}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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) }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue