aboutsummaryrefslogtreecommitdiff
path: root/templates/income/update.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/income/update.html')
-rw-r--r--templates/income/update.html99
1 files changed, 52 insertions, 47 deletions
diff --git a/templates/income/update.html b/templates/income/update.html
index 6dd649a..855d5c4 100644
--- a/templates/income/update.html
+++ b/templates/income/update.html
@@ -6,7 +6,7 @@
{% block main %}
- <div>
+ <section class="g-Section">
<p class="g-Paragraph">
<a
class="g-Link g-Media__Large"
@@ -33,53 +33,59 @@
>
<h1 class="g-H1">Modification</h1>
- <label class="g-Form__Label" for="amount">Montant</label>
- <input
- name="amount"
- type="number"
- class="g-Form__Input"
- id="amount"
- value="{{ form.amount | default(value=income.amount) }}"
- required
- />
+ <label class="g-Form__Label">
+ Montant
+ <input
+ name="amount"
+ type="number"
+ class="g-Form__Input"
+ value="{{ form.amount | default(value=income.amount) }}"
+ required
+ />
+ </label>
{% set user_id = form.user_id | default(value="" ~ income.user_id) %}
- <label class="g-Form__Label" for="user_id">Personne</label>
- <select name="user_id" id="user_id" class="g-Form__Select" required>
- {% for user in users %}
- <option
- value="{{ user.id }}"
- {% if "" ~ user.id == user_id %} selected {% endif %}
- >
- {{ user.name }}
- </option>
- {% endfor %}
- </select>
+ <label class="g-Form__Label">
+ Personne
+ <select name="user_id" class="g-Form__Select" required>
+ {% for user in users %}
+ <option
+ value="{{ user.id }}"
+ {% if "" ~ user.id == user_id %} selected {% endif %}
+ >
+ {{ user.name }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
{% set month_index = form.month | default(value="" ~ income.month) %}
- <label class="g-Form__Label" for="month">Mois</label>
- <select name="month" id="month" class="g-Form__Select" required>
- {% for month in months %}
- <option
- value="{{ loop.index }}"
- {% if "" ~ loop.index == month_index %} selected {% endif %}
- >
- {{ month }}
- </option>
- {% endfor %}
- </select>
-
- <label class="g-Form__Label" for="year">Année</label>
- <input
- name="year"
- type="number"
- class="g-Form__Input"
- id="year"
- value="{{ form.year | default(value=income.year) }}"
- required
- />
+ <label class="g-Form__Label">
+ Mois
+ <select name="month" class="g-Form__Select" required>
+ {% for month in months %}
+ <option
+ value="{{ loop.index }}"
+ {% if "" ~ loop.index == month_index %} selected {% endif %}
+ >
+ {{ month }}
+ </option>
+ {% endfor %}
+ </select>
+ </label>
+
+ <label class="g-Form__Label">
+ Année
+ <input
+ name="year"
+ type="number"
+ class="g-Form__Input"
+ value="{{ form.year | default(value=income.year) }}"
+ required
+ />
+ </label>
<div>
<input class="g-Button__Validate" type="submit" value="Modifier" />
@@ -99,19 +105,18 @@
utilisée.
</p>
{% else %}
- <label class="g-Form__Label" for="remove-input">
+ <label class="g-Form__Label">
Veuillez recopier le montant du revenu : « {{ income.amount }} ».
+ <input name="remove-input" class="g-Form__Input" data-name="{{ income.amount }}" />
</label>
- <input name="remove-input" class="g-Form__Input" id="remove-input" data-name="{{ income.amount }}" />
-
<div>
- <input class="g-Button__Danger" type="submit" value="Supprimer" id="remove-button" disabled />
+ <input id="remove-button" class="g-Button__Danger" type="submit" value="Supprimer" disabled />
</div>
{% endif %}
</form>
{% endif %}
- </div>
+ </section>
{% endblock main %}