{% if active_tab != "ask" %}
{% filter trim %}
<div
    id="searchBar"
    class="search-bar{% if query %} cancelable{% endif %}"
>
    {# url action depends on which tab is active #}
    {% if active_tab == "tags" %}
        <input type="hidden" name="t" value="tag"/>
        {% set query=stag %}
    {% elif active_tab == "users" %}
        <input type="hidden" name="t" value="user"/>
    {% endif %}
    <input
        class="searchInput"
        type="text"
        autocomplete="off"
        value="{{ query|escape if query != None else '' }}"
        name="query"
        placeholder="{% trans %}Search or ask your question{% endtrans %}"
        id="keywords"
    />
    <input type="submit" value="" name="search" class="searchBtn" />
    <input type="button"
        value="X"
        name="reset_query"
        class="cancelSearchBtn"
        {% if not query %}{# query is only defined by questions view (active_tab) #}
            style="display: none;"
        {% endif %}
    />
</div>
{% endfilter %}
{% endif %}
