diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/payment/create.html | 26 | ||||
-rw-r--r-- | templates/payment/table.html | 20 |
2 files changed, 33 insertions, 13 deletions
diff --git a/templates/payment/create.html b/templates/payment/create.html index aea6fcd..5bae767 100644 --- a/templates/payment/create.html +++ b/templates/payment/create.html @@ -72,18 +72,20 @@ {% set category_id = form.category_id | default(value="") %} - <label class="g-Form__Label" for="category_id">Catégorie</label> - <select name="category_id" id="category_id" class="g-Form__Select" required> - {% for category in categories %} - <option - value="{{ category.id }}" - style="color: {{ category.color }}" - {% if "" ~ category.id == category_id %} selected {% endif %} - > - {{ category.name }} - </option> - {% endfor %} - </select> + <label class="g-Form__Label" for="category_id"> + Catégorie + <select name="category_id" id="category_id" class="g-Form__Select" required> + {% for category in categories %} + <option + value="{{ category.id }}" + style="color: {{ category.color }}" + {% if "" ~ category.id == category_id %} selected {% endif %} + > + {{ category.name }} + </option> + {% endfor %} + </select> + </label> {% set date = form.date | default(value=now() | date(format="%Y-%m-%d")) %} diff --git a/templates/payment/table.html b/templates/payment/table.html index 19b56b4..5234e05 100644 --- a/templates/payment/table.html +++ b/templates/payment/table.html @@ -44,6 +44,23 @@ class="g-Form__Input g-Payments__SearchInput" value="{{ query.search }}" /> + + <label class="g-Form__Label"> + Catégorie + <select name="category" class="g-Form__Select"> + <option disabled selected value></option> + {% for category in categories %} + <option + value="{{ category.id }}" + style="color: {{ category.color }}" + {% if category.id == query.category %} selected {% endif %} + > + {{ category.name }} + </option> + {% endfor %} + </select> + </label> + <input type="submit" class="g-Button__Search" value="🔍"> </form> {% endif %} @@ -118,7 +135,8 @@ {{ paging::paging( url="/" ~ payments_params( search=query.search, - frequency=query.frequency + frequency=query.frequency, + category=query.category ), page=page, max_page=max_page |