admin filter for date and datetime using <input>

This commit is contained in:
bkfox
2022-05-05 14:45:23 +02:00
parent 36f5ee8b44
commit e44b77d0b3
5 changed files with 30 additions and 19 deletions

View File

@ -1,20 +1,18 @@
{% extends "./filter.html" %}
{% load static %}
{% block content %}
{% with choices|first as choice %}
<form method="GET">
<ul>
{% for choice in choices %}
<li>
<label for="{{ choice.name }}">{{ choice.label }}</label>
<input type="{{ choice.type }}" name="{{ choice.name }}"
<ul>
{% for choice in choices %}
<div>
<form method="GET">
<label for="filter-{{ choice.name }}">{{ choice.label }}: </label>
<input id="filter-{{ choice.name }}" type="{{ choice.type }}" name="{{ choice.name }}"
value="{{ choice.value }}" {{ choice.extra }} />
</li>
{% endfor %}
</ul>
<div style="text-align: right;">
<input type="submit" value="Chercher">
<button class="button"><img src="{% static "admin/img/search.svg" %}" /></button>
</form>
</div>
</form>
{% endwith %}
{% endfor %}
</ul>
{% endblock %}