{% extends "django_cradmin/viewhelpers/listfilter/base/abstractfilter.django.html" %}
{% load i18n %}
{% load cradmin_icon_tags %}

{% block inputfield %}
    <div class="django-cradmin-clearable-textinput">
        <input id="{{ me.get_inputfield_dom_id }}"
                type="{{ me.get_input_html_element_type }}"
                class="form-control" placeholder="{{ me.get_placeholder }}"
                value="{{ me.get_inputfield_value }}"
                aria-controls="{{ me.get_target_dom_id }}"
                django-cradmin-listfilter-urlpattern="{{ me.get_urlpattern }}"
                django-cradmin-listfilter-emptyvalue-url="{{ me.get_emptyvalue_url }}"
                django-cradmin-listfilter-textinput={{ me.get_angularjs_options_json|safe }}
                {% block inputfield_extra_attributes %}{% endblock %}>
        <button type="button" class="btn btn-link django-cradmin-clearable-textinput-button"
                django-cradmin-clearable-textinput="#{{ me.get_inputfield_dom_id }}"
                aria-label="
                    {% if me.get_label %}
                        {% blocktrans trimmed with label=me.get_label %}
                            Clear {{ label }}
                        {% endblocktrans %}
                    {% else %}
                        {% trans "Clear" %}
                    {% endif %}
                ">
            <span class="{% cradmin_icon "x" %}" aria-hidden="true"></span>
        </button>
    </div>
{% endblock inputfield %}
