Add sort option to search form template

This commit is contained in:
Aroy-Art 2024-10-22 22:54:25 +02:00
parent 10e36dbb80
commit e56a804f4e
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -44,6 +44,18 @@
<button class="input-group-text nf nf-fa-search" id="search-addon" type="submit"></button> <button class="input-group-text nf nf-fa-search" id="search-addon" type="submit"></button>
</div> </div>
<div class="input-group">
<label class="input-group-text" for="type">{{ form.sort.label }}:</label>
<div class="form-control pt-2">
{% for radio in form.sort %}
<div class="form-check form-check-inline">
<label for="{{ radio.id_for_label }}">{{ radio.choice_label }}</label>
<input class="form-check-input" type="radio" name="sort" value="{{ radio.data.value }}" id="{{ radio.id_for_label }}" {% if radio.data.selected %}checked{% endif %}>
</div>
{% endfor %}
</div>
</div>
<div class="input-group"> <div class="input-group">
<label class="input-group-text" for="category">{{ form.category.label }}:</label> <label class="input-group-text" for="category">{{ form.category.label }}:</label>
{{ form.category }} {{ form.category }}