{% if active_tab != "ask" %}
{% spaceless %}
<div 
    id="searchBar"
    class="{% 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|default_if_none('')|escape }}" 
        name="query" 
        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>
{% endspaceless %}
{% endif %}
