1
1
{% load i18n wagtailadmin_tags %}
2
2
{% include "wagtailadmin/shared/header.html" with title=title icon=icon merged=1 %}
3
3
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 >
7
8
{% if uploadforms %}
8
9
{# Both auth and video forms are powered by the same media form, so use one of them #}
9
10
{% if uploadforms.video %}
16
17
17
18
< div class ="w-tabs__wrapper w-overflow-hidden ">
18
19
{# 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
+ >
20
24
{% trans "Search" as search_text %}
21
25
{% include 'wagtailadmin/shared/tabs/tab_nav_link.html' with tab_id='search' title=search_text %}
22
26
{% if uploadforms.audio %}
40
44
{% endif %}
41
45
42
46
< 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 ">
44
48
< form action ="{{ chooser_url }} " method ="GET " role ="search " class ="media-search search-bar " novalidate data-chooser-modal-search >
45
49
< ul class ="fields ">
46
50
{% for field in searchform %}
@@ -66,7 +70,7 @@ <h3>{% trans 'Popular tags' %}</h3>
66
70
</ section >
67
71
{% if uploadforms %}
68
72
{% 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 >
70
74
{% include "wagtailadmin/shared/non_field_errors.html" with form=uploadform %}
71
75
< form class ="media-upload " action ="{% url 'wagtailmedia:chooser_upload' form_type %} " method ="POST " enctype ="multipart/form-data " novalidate >
72
76
{% csrf_token %}
0 commit comments