diff options
Diffstat (limited to 'templates/payment/update.html')
-rw-r--r-- | templates/payment/update.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/templates/payment/update.html b/templates/payment/update.html index 22a4d01..0cd7a06 100644 --- a/templates/payment/update.html +++ b/templates/payment/update.html @@ -57,7 +57,7 @@ <input name="name" class="g-Form__Input" - value="{{ form.name | default(value=payment.name) }}" + value="{{ form.name or payment.name }}" required /> </label> @@ -68,12 +68,12 @@ name="cost" type="number" class="g-Form__Input" - value="{{ form.cost | default(value=payment.cost) }}" + value="{{ form.cost or payment.cost }}" required /> </label> - {% set user_id = form.user_id | default(value="" ~ payment.user_id) %} + {% set user_id = form.user_id or payment.user_id %} <label class="g-Form__Label"> Personne @@ -81,7 +81,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> @@ -89,7 +89,7 @@ </select> </label> - {% set category_id = form.category_id | default(value="" ~ payment.category_id) %} + {% set category_id = form.category_id or payment.category_id %} <label class="g-Form__Label"> Catégorie @@ -97,7 +97,7 @@ {% for category in categories %} <option value="{{ category.id }}" - {% if "" ~ category.id == category_id %} selected {% endif %} + {% if "" ~ category.id == "" ~ category_id %} selected {% endif %} > {{ category.name }} </option> @@ -105,7 +105,7 @@ </select> </label> - {% set date = form.date | default(value=payment.date) %} + {% set date = form.date or payment.date %} {% if payment.frequency == "Punctual" %} <label class="g-Form__Label"> |