diff options
author | Joris | 2021-10-10 18:20:57 +0200 |
---|---|---|
committer | Joris | 2021-10-10 21:21:34 +0200 |
commit | 8ccd762bfc3d7da2716749d709cf5cc216882a23 (patch) | |
tree | 0629f749da8b06698e760b275070ba6a2e8bde0c /templates/income/create.html | |
parent | af1177e814d19e63ce39c42fc7c5888e4b3d9604 (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/create.html')
-rw-r--r-- | templates/income/create.html | 96 |
1 files changed, 51 insertions, 45 deletions
diff --git a/templates/income/create.html b/templates/income/create.html index b74dddd..3c899ca 100644 --- a/templates/income/create.html +++ b/templates/income/create.html @@ -6,7 +6,7 @@ {% block main %} - <div> + <section class="g-Section"> <p class="g-Paragraph"> <a class="g-Link g-Media__Large" @@ -29,61 +29,67 @@ <div class="g-Form__Error">{{ error }}</div> {% endif %} - <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="") }}" - required - {% if not form %} autofocus {% endif %} - /> + <label class="g-Form__Label"> + Montant + <input + name="amount" + type="number" + class="g-Form__Input" + value="{{ form.amount | default(value="") }}" + required + {% if not form %} autofocus {% endif %} + /> + </label> {% set user_id = form.user_id | default(value="" ~ connected_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="" ~ current_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"> + 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" for="year">Année</label> - <input - name="year" - type="number" - class="g-Form__Input" - id="year" - value="{{ form.year | default(value=now() | date(format="%Y")) }}" - required - /> + <label class="g-Form__Label"> + Année + <input + name="year" + type="number" + class="g-Form__Input" + value="{{ form.year | default(value=now() | date(format="%Y")) }}" + required + /> + </label> <div> <input class="g-Button__Validate" type="submit" value="Créer" /> </div> </form> - </div> + </section> {% endblock main %} |