diff options
Diffstat (limited to 'templates/income/create.html')
-rw-r--r-- | templates/income/create.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/income/create.html b/templates/income/create.html index 3c899ca..6ea1fb0 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 @@ -49,7 +49,7 @@ {% for user in users %} <option value="{{ user.id }}" - {% if "" ~ user.id == user_id %} selected {% endif %} + {% if "" ~ user.id == "" ~ user_id %} selected {% endif %} > {{ user.name }} </option> @@ -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 @@ -65,7 +65,7 @@ {% for month in months %} <option value="{{ loop.index }}" - {% if "" ~ loop.index == month_index %} + {% if "" ~ loop.index == "" ~ month_index %} selected {% endif %} > @@ -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> |