From 24eeb54a6b7159964e8887ade7fa5173b50feb3a Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 26 Jan 2025 17:58:57 +0100 Subject: Replace tera by minijinja tera was doing the job all right, but minijinja has fewer dependencies. --- templates/income/create.html | 12 ++++++------ templates/income/table.html | 6 +++--- templates/income/update.html | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'templates/income') 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 @@

Retour aux revenus @@ -18,7 +18,7 @@

@@ -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 %} /> - {% set user_id = form.user_id | default(value="" ~ connected_user.id) %} + {% set user_id = form.user_id or connected_user.id %} - {% set month_index = form.month | default(value="" ~ current_month) %} + {% set month_index = form.month or current_month %} diff --git a/templates/income/table.html b/templates/income/table.html index 60cd6e0..34ee096 100644 --- a/templates/income/table.html +++ b/templates/income/table.html @@ -18,7 +18,7 @@ Ajouter un revenu @@ -33,7 +33,7 @@ {% for income in incomes %} {{ income.amount | euros() }} @@ -44,7 +44,7 @@ {% endfor %} - {{ paging::paging( + {{ paging.view( url="/incomes", page=page, max_page=max_page diff --git a/templates/income/update.html b/templates/income/update.html index 855d5c4..f5f976e 100644 --- a/templates/income/update.html +++ b/templates/income/update.html @@ -10,7 +10,7 @@

Retour aux revenus @@ -39,12 +39,12 @@ name="amount" type="number" class="g-Form__Input" - value="{{ form.amount | default(value=income.amount) }}" + value="{{ form.amount or income.amount }}" required /> - {% set user_id = form.user_id | default(value="" ~ income.user_id) %} + {% set user_id = form.user_id or income.user_id %} - {% set month_index = form.month | default(value="" ~ income.month) %} + {% set month_index = form.month or income.month %} -- cgit v1.2.3