{% extends "wagtailadmin/generic/chooser/chooser.html" %}
{% load i18n wagtailadmin_tags %}

{% block filter_form %}
    <form data-chooser-modal-search action="{{ results_url }}" method="GET" autocomplete="off" novalidate>
        <ul class="fields">
            {% for field in filter_form %}
                <li>
                    {% include "wagtailadmin/shared/field.html" with field=field %}
                </li>
            {% endfor %}
            {% if popular_tags %}
                <li class="taglist w-label-3">
                    <h3>{% trans 'Popular tags' %}</h3>
                    {% for tag in popular_tags %}
                        <a class="suggested-tag tag" href="{% url 'wagtailimages:index' %}?tag={{ tag.name|urlencode }}">{{ tag.name }}</a>
                    {% endfor %}
                </li>
            {% endif %}
        </ul>
    </form>
{% endblock %}
