Files
aircox-radiocampus/aircox/templates/admin/aircox/filters/date_filter.html
2022-08-07 10:48:31 +02:00

26 lines
941 B
HTML

{% extends "./filter.html" %}
{% load static i18n %}
{% block content %}
<ul>
{% for choice in choices %}
<li>
{% if choice.type %}
<form method="GET" action="?{{ choice.query_string }}"
onsubmit="return this.{{ choice.name }}.value ? true : false"">
<label for="filter-{{ choice.name }}">{{ choice.label }}: </label>
<input id="filter-{{ choice.name }}" type="{{ choice.type }}" name="{{ choice.name }}"
value="{{ choice.value }}" {{ choice.extra }}/>
{% for k, v in choice.query_attrs.items %}
<input type="hidden" name="{{k}}" value="{{v}}"/>
{% endfor %}
<button class="button"><img src="{% static "admin/img/search.svg" %}" /></button>
</form>
{% else %}
<a href="?{{ choice.query_string }}">{{ choice.label }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endblock %}