11{% load i18n wagtailadmin_tags %}
22{% include "wagtailadmin/shared/header.html" with title=title icon=icon merged=1 %}
33
4- {# TODO: drop data-wmtabs and the tabs.js include when a better tabs framework is in place #}
5- {# See https://github.com/wagtail/wagtail/issues/8408. #}
6- < div class ="w-tabs wagtailmedia-tabs " data-tabs data-tabs-animate data-tabs-disable-url data-wm-tabs >
4+ {# TODO: drop data-wmtabs and the tabs.js include once we drop support for Wagtail < 7 .1 #}
5+ < div class ="w-tabs wagtailmedia-tabs "
6+ data-controller ="w-tabs " data-w-tabs-active-class ="animate-in "
7+ data-tabs data-tabs-animate data-tabs-disable-url data-wm-tabs >
78 {% if uploadforms %}
89 {# Both auth and video forms are powered by the same media form, so use one of them #}
910 {% if uploadforms.video %}
1617
1718 < div class ="w-tabs__wrapper w-overflow-hidden ">
1819 {# Using nice-padding and full width class until the modal header is restyled #}
19- < div role ="tablist " class ="w-tabs__list w-w-full nice-padding ">
20+ < div role ="tablist "
21+ class ="w-tabs__list w-w-full nice-padding "
22+ data-action ="keydown.right->w-tabs#selectNext keydown.left->w-tabs#selectPrevious keydown.home->w-tabs#selectFirst keydown.end->w-tabs#selectLast "
23+ >
2024 {% trans "Search" as search_text %}
2125 {% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='search' title=search_text %}
2226 {% if uploadforms.audio %}
4044 {% endif %}
4145
4246 < div class ="tab-content ">
43- < section id ="tab-search " class ="w-tabs__panel " role ="tabpanel " aria-labelledby ="tab-label-search ">
47+ < section id ="tab-search " class ="w-tabs__panel " role ="tabpanel " data-w-tabs-target =" panel " aria-labelledby ="tab-label-search ">
4448 < form action ="{{ chooser_url }} " method ="GET " role ="search " class ="media-search search-bar " novalidate data-chooser-modal-search >
4549 < ul class ="fields ">
4650 {% for field in searchform %}
@@ -66,7 +70,7 @@ <h3>{% trans 'Popular tags' %}</h3>
6670 </ section >
6771 {% if uploadforms %}
6872 {% for form_type, uploadform in uploadforms.items %}
69- < section id ="tab-upload-{{ form_type }} " class ="w-tabs__panel " role ="tabpanel " aria-labelledby ="tab-label-upload-{{ form_type }} " hidden >
73+ < section id ="tab-upload-{{ form_type }} " class ="w-tabs__panel " role ="tabpanel " data-w-tabs-target =" panel " aria-labelledby ="tab-label-upload-{{ form_type }} " hidden >
7074 {% include "wagtailadmin/shared/non_field_errors.html" with form=uploadform %}
7175 < form class ="media-upload " action ="{% url 'wagtailmedia:chooser_upload' form_type %} " method ="POST " enctype ="multipart/form-data " novalidate >
7276 {% csrf_token %}
0 commit comments