{% load i18n %}

<h3>{{ title }}</h3>
<ul>
    <li>
        {% with choices.0 as all_choice %}
            <form method="GET" action="">

                {% for k, v in all_choice.query_parts %}
                    <input type="hidden" name="{{ k }}" value="{{ v }}" />
                {% endfor %}

                <div class="container">
                    <input  type="text"
                            class="form-control"
                            value="{{ spec.value|default_if_none:'' }}"
                            name="{{ spec.parameter_name }}"/>

                    {% if not all_choice.selected %}
                        <a class="btn btn-xs btn-danger" href="{{ all_choice.query_string }}">
                            <i class="fa fa-remove"></i>
                        </a>
                    {% endif %}
                </div>

            </form>
        {% endwith %}
    </li>
</ul>
