aboutsummaryrefslogtreecommitdiff
path: root/templates/income/create.html
diff options
context:
space:
mode:
authorJoris2025-01-26 17:58:57 +0100
committerJoris2025-01-26 17:58:57 +0100
commit24eeb54a6b7159964e8887ade7fa5173b50feb3a (patch)
tree91af6253df784445db9b084b02b38b37a83224e8 /templates/income/create.html
parentc5759f348e70cf54b4bfa4cd17e1fe1828ead30a (diff)
Replace tera by minijinjamain
tera was doing the job all right, but minijinja has fewer dependencies.
Diffstat (limited to 'templates/income/create.html')
-rw-r--r--templates/income/create.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/income/create.html b/templates/income/create.html
index 3c899ca..a7755db 100644
--- a/templates/income/create.html
+++ b/templates/income/create.html
@@ -10,7 +10,7 @@
<p class="g-Paragraph">
<a
class="g-Link g-Media__Large"
- href="/incomes?page={{ query.page | default(value=1) }}"
+ href="/incomes?page={{ query.page or 1 }}"
>
Retour aux revenus
</a>
@@ -18,7 +18,7 @@
<form
class="g-Form"
- action="/income/create?page={{ query.page | default(value=1) }}"
+ action="/income/create?page={{ query.page or 1 }}"
method="POST"
>
<h1 class="g-H1">
@@ -35,13 +35,13 @@
name="amount"
type="number"
class="g-Form__Input"
- value="{{ form.amount | default(value="") }}"
+ value="{{ form.amount or "" }}"
required
{% if not form %} autofocus {% endif %}
/>
</label>
- {% set user_id = form.user_id | default(value="" ~ connected_user.id) %}
+ {% set user_id = form.user_id or connected_user.id %}
<label class="g-Form__Label">
Personne
@@ -57,7 +57,7 @@
</select>
</label>
- {% set month_index = form.month | default(value="" ~ current_month) %}
+ {% set month_index = form.month or current_month %}
<label class="g-Form__Label">
Mois
@@ -81,7 +81,7 @@
name="year"
type="number"
class="g-Form__Input"
- value="{{ form.year | default(value=now() | date(format="%Y")) }}"
+ value="{{ form.year or now("%Y") }}"
required
/>
</label>