aboutsummaryrefslogtreecommitdiff
path: root/templates/income/update.html
diff options
context:
space:
mode:
authorJoris2021-10-10 18:20:57 +0200
committerJoris2021-10-10 21:21:34 +0200
commit8ccd762bfc3d7da2716749d709cf5cc216882a23 (patch)
tree0629f749da8b06698e760b275070ba6a2e8bde0c /templates/income/update.html
parentaf1177e814d19e63ce39c42fc7c5888e4b3d9604 (diff)
Search payments by categories explicitely
It was already possible to search by categories in the full text input, but it could have matched other fields as well. Explicitely add a select to search by categories. Also put the search form in a left aside. The mobile view is not done for the moment.
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 %}