{% load i18n shatailadmin_tags %} {% trans "Choose a document" as choose_str %} {% include "shatailadmin/shared/header.html" with title=choose_str merged=1 icon="doc-full-inverse" %} {{ uploadform.media.js }} {{ uploadform.media.css }}

<div class="w-tabs" data-tabs data-tabs-disable-url>
    {% if uploadform %}
    <div class="w-tabs__wrapper w-overflow-hidden">
        {# Using nice-padding and full width class until the modal header is restyled #}
        <div role="tablist" class="w-tabs__list w-w-full nice-padding">
            {% trans "Search" as search_text %} {% include 'shatailadmin/shared/tabs/tab_nav_link.html' with tab_id='search' title=search_text %} {% trans "Upload" as upload_text %} {% include 'shatailadmin/shared/tabs/tab_nav_link.html' with tab_id='upload' title=upload_text
            %}
        </div>
    </div>
    {% endif %}

    <div class="tab-content nice-padding">
        <section id="tab-search" class="w-tabs__panel" role="tabpanel" aria-labelledby="tab-label-search">
            <form class="document-search search-bar" action="{% url 'shataildocs:chooser_results' %}" method="GET" novalidate>
                <ul class="fields">
                    {% for field in searchform %} {% include "shatailadmin/shared/field_as_li.html" with field=field %} {% endfor %} {% if collections %} {% include "shatailadmin/shared/collection_chooser.html" %} {% endif %}
                </ul>
            </form>
            <div id="search-results" class="listing documents">
                {% include "shataildocs/chooser/results.html" %}
            </div>
        </section>
        {% if uploadform %} {% include "shataildocs/chooser/upload_form.html" with form=uploadform %} {% endif %}
    </div>
</div>