wagtail 7.2rc1__py3-none-any.whl → 7.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wagtail/__init__.py +1 -1
- wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ar/LC_MESSAGES/django.po +44 -89
- wagtail/admin/locale/az_AZ/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/az_AZ/LC_MESSAGES/django.po +4 -7
- wagtail/admin/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/be/LC_MESSAGES/django.po +15 -42
- wagtail/admin/locale/bg/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/bg/LC_MESSAGES/django.po +7 -16
- wagtail/admin/locale/bn/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/bn/LC_MESSAGES/django.po +4 -13
- wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ca/LC_MESSAGES/django.po +159 -74
- wagtail/admin/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/ca/LC_MESSAGES/djangojs.po +11 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.po +17 -51
- wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cy/LC_MESSAGES/django.po +6 -13
- wagtail/admin/locale/da/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/da/LC_MESSAGES/django.po +10 -22
- wagtail/admin/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/de/LC_MESSAGES/django.po +42 -93
- wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/dv/LC_MESSAGES/django.po +26 -64
- wagtail/admin/locale/el/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/el/LC_MESSAGES/django.po +9 -31
- wagtail/admin/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/es/LC_MESSAGES/django.po +17 -52
- wagtail/admin/locale/es_419/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/es_419/LC_MESSAGES/django.po +4 -22
- wagtail/admin/locale/es_VE/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/es_VE/LC_MESSAGES/django.po +4 -7
- wagtail/admin/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/et/LC_MESSAGES/django.po +15 -42
- wagtail/admin/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fa/LC_MESSAGES/django.po +12 -50
- wagtail/admin/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fi/LC_MESSAGES/django.po +43 -70
- wagtail/admin/locale/fi/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fi/LC_MESSAGES/djangojs.po +17 -0
- wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/fr/LC_MESSAGES/django.po +157 -74
- wagtail/admin/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/fr/LC_MESSAGES/djangojs.po +11 -0
- wagtail/admin/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/gl/LC_MESSAGES/django.po +155 -72
- wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +11 -0
- wagtail/admin/locale/he_IL/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/he_IL/LC_MESSAGES/django.po +7 -28
- wagtail/admin/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/hr_HR/LC_MESSAGES/django.po +15 -38
- wagtail/admin/locale/ht/LC_MESSAGES/django.po +4 -4
- wagtail/admin/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/hu/LC_MESSAGES/django.po +44 -91
- wagtail/admin/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/id_ID/LC_MESSAGES/django.po +10 -31
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +172 -68
- wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.po +8 -2
- wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/it/LC_MESSAGES/django.po +31 -76
- wagtail/admin/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ja/LC_MESSAGES/django.po +15 -42
- wagtail/admin/locale/ka/LC_MESSAGES/django.po +4 -4
- wagtail/admin/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ko/LC_MESSAGES/django.po +20 -57
- wagtail/admin/locale/lt/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/lt/LC_MESSAGES/django.po +12 -31
- wagtail/admin/locale/lv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/lv/LC_MESSAGES/django.po +9 -40
- wagtail/admin/locale/mi/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/mi/LC_MESSAGES/django.po +6 -10
- wagtail/admin/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/mn/LC_MESSAGES/django.po +10 -43
- wagtail/admin/locale/my/LC_MESSAGES/django.po +4 -4
- wagtail/admin/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nb/LC_MESSAGES/django.po +15 -53
- wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/django.po +157 -73
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +11 -0
- wagtail/admin/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pl/LC_MESSAGES/django.po +27 -72
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +38 -83
- wagtail/admin/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/pt_PT/LC_MESSAGES/django.po +17 -56
- wagtail/admin/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ro/LC_MESSAGES/django.po +23 -68
- wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ru/LC_MESSAGES/django.po +44 -89
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +9 -28
- wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sl/LC_MESSAGES/django.po +45 -90
- wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/sv/LC_MESSAGES/django.po +27 -72
- wagtail/admin/locale/tet/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tet/LC_MESSAGES/django.po +12 -22
- wagtail/admin/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/th/LC_MESSAGES/django.po +10 -42
- wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr/LC_MESSAGES/django.po +61 -68
- wagtail/admin/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr_TR/LC_MESSAGES/django.po +15 -42
- wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ug/LC_MESSAGES/django.po +38 -83
- wagtail/admin/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/uk/LC_MESSAGES/django.po +15 -45
- wagtail/admin/locale/vi/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/vi/LC_MESSAGES/django.po +4 -17
- wagtail/admin/locale/zh/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh/LC_MESSAGES/django.po +7 -19
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +17 -54
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.po +15 -37
- wagtail/admin/static/wagtailadmin/js/core.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
- wagtail/admin/templates/wagtailadmin/base.html +1 -1
- wagtail/admin/templatetags/wagtailadmin_tags.py +13 -1
- wagtail/admin/tests/pages/test_create_page.py +8 -0
- wagtail/admin/tests/pages/test_preview.py +111 -0
- wagtail/admin/views/generic/preview.py +8 -1
- wagtail/admin/views/pages/preview.py +10 -1
- wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +12 -2
- wagtail/contrib/forms/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/forms/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +9 -10
- wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +1 -14
- wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +7 -11
- wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +9 -8
- wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +9 -9
- wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +10 -9
- wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +1 -14
- wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +9 -9
- wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +1 -14
- wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +1 -14
- wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +1 -13
- wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.po +5 -5
- wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +5 -5
- wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.po +5 -5
- wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +8 -7
- wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.po +1 -7
- wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.po +8 -3
- wagtail/contrib/settings/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/tests/shared/test_preview.py +29 -0
- wagtail/contrib/settings/tests/site_specific/test_admin.py +8 -0
- wagtail/contrib/settings/views.py +8 -2
- wagtail/contrib/simple_translation/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/simple_translation/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.po +6 -3
- wagtail/contrib/table_block/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +6 -3
- wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.po +6 -3
- wagtail/contrib/table_block/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.po +6 -3
- wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/documents/forms.py +1 -1
- wagtail/documents/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ar/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/be/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ca/LC_MESSAGES/django.po +5 -5
- wagtail/documents/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/cs/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/de/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/el/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/el/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/es/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/et/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/et/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/fa/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/fa/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/fi/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/fr/LC_MESSAGES/django.po +5 -5
- wagtail/documents/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/gl/LC_MESSAGES/django.po +5 -5
- wagtail/documents/locale/he_IL/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/he_IL/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/hr_HR/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/hu/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/id_ID/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +14 -4
- wagtail/documents/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/it/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/ja/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ja/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ko/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/lt/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/lt/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/mi/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/mi/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/mn/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/mn/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nb/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nl/LC_MESSAGES/django.po +6 -6
- wagtail/documents/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/pl/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/pt_BR/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/pt_PT/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ro/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sl/LC_MESSAGES/django.po +1 -7
- wagtail/documents/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/sv/LC_MESSAGES/django.po +1 -6
- wagtail/documents/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/th/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/th/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/tr/LC_MESSAGES/django.po +13 -5
- wagtail/documents/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/tr_TR/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ug/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/uk/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +1 -5
- wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.po +1 -5
- wagtail/documents/tests/test_admin_views.py +35 -3
- wagtail/documents/tests/test_search.py +41 -27
- wagtail/documents/views/documents.py +31 -5
- wagtail/embeds/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/images/forms.py +1 -1
- wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ar/LC_MESSAGES/django.po +7 -10
- wagtail/images/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/be/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/bg/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ca/LC_MESSAGES/django.po +15 -9
- wagtail/images/locale/cs/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/cy/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/de/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/dv/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/el/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/es/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/et/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/fa/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fi/LC_MESSAGES/django.po +18 -9
- wagtail/images/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/fr/LC_MESSAGES/django.po +15 -9
- wagtail/images/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/gl/LC_MESSAGES/django.po +15 -9
- wagtail/images/locale/he_IL/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/hr_HR/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/hu/LC_MESSAGES/django.po +7 -10
- wagtail/images/locale/id_ID/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/is_IS/LC_MESSAGES/django.po +34 -9
- wagtail/images/locale/it/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/ja/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/ka/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/ko/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/lt/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/lv/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/mi/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/mn/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/images/locale/nb/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/nl/LC_MESSAGES/django.po +15 -9
- wagtail/images/locale/pl/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/pt_BR/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/pt_PT/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/ro/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ru/LC_MESSAGES/django.po +7 -10
- wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/sl/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/sv/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/tet/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/th/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/tr/LC_MESSAGES/django.po +85 -7
- wagtail/images/locale/tr_TR/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/ug/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/uk/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/vi/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/zh/LC_MESSAGES/django.po +4 -4
- wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +7 -7
- wagtail/images/locale/zh_Hant/LC_MESSAGES/django.po +7 -7
- wagtail/images/tests/test_admin_views.py +75 -6
- wagtail/images/tests/test_models.py +40 -26
- wagtail/images/views/chooser.py +10 -5
- wagtail/images/views/images.py +36 -6
- wagtail/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ar/LC_MESSAGES/django.po +1 -9
- wagtail/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ca/LC_MESSAGES/django.po +4 -4
- wagtail/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/de/LC_MESSAGES/django.po +1 -9
- wagtail/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/dv/LC_MESSAGES/django.po +1 -8
- wagtail/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/fr/LC_MESSAGES/django.po +4 -4
- wagtail/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/gl/LC_MESSAGES/django.po +3 -3
- wagtail/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/hu/LC_MESSAGES/django.po +1 -9
- wagtail/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/is_IS/LC_MESSAGES/django.po +14 -4
- wagtail/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/nl/LC_MESSAGES/django.po +4 -4
- wagtail/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/pl/LC_MESSAGES/django.po +1 -9
- wagtail/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ro/LC_MESSAGES/django.po +1 -9
- wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ru/LC_MESSAGES/django.po +1 -9
- wagtail/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sl/LC_MESSAGES/django.po +1 -9
- wagtail/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/sv/LC_MESSAGES/django.po +1 -9
- wagtail/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/tr/LC_MESSAGES/django.po +4 -8
- wagtail/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ug/LC_MESSAGES/django.po +1 -8
- wagtail/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/migrations/0096_referenceindex_referenceindex_source_object_and_more.py +28 -0
- wagtail/models/reference_index.py +26 -0
- wagtail/project_template/requirements.txt +1 -1
- wagtail/search/apps.py +1 -1
- wagtail/search/backends/__init__.py +1 -1
- wagtail/search/backends/base.py +1 -1
- wagtail/search/backends/database/__init__.py +1 -1
- wagtail/search/backends/database/fallback.py +1 -1
- wagtail/search/backends/database/mysql/mysql.py +1 -1
- wagtail/search/backends/database/mysql/query.py +1 -1
- wagtail/search/backends/database/postgres/postgres.py +1 -1
- wagtail/search/backends/database/postgres/query.py +1 -1
- wagtail/search/backends/database/postgres/weights.py +1 -1
- wagtail/search/backends/database/sqlite/query.py +1 -1
- wagtail/search/backends/database/sqlite/sqlite.py +1 -1
- wagtail/search/backends/database/sqlite/utils.py +1 -1
- wagtail/search/backends/elasticsearch7.py +4 -4
- wagtail/search/backends/elasticsearch8.py +4 -4
- wagtail/search/backends/elasticsearch9.py +4 -4
- wagtail/search/backends/opensearch2.py +4 -4
- wagtail/search/backends/opensearch3.py +4 -4
- wagtail/search/index.py +1 -1
- wagtail/search/locale/ar/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ar/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/be/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/be/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/ca/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ca/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/cy/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/cy/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/de/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/de/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/dv/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/dv/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/es/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/es/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/fi/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/fr/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/fr/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/gl/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/gl/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/hr_HR/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/hu/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/hu/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/is_IS/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/it/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/ko/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ko/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/nb/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/nb/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/nl/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/pl/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/pl/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/pt_PT/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/ro/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ro/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ru/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/sl/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/sl/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/sv/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/sv/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/tr/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/ug/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/ug/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/uk/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/uk/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/search/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- wagtail/search/locale/zh_Hans/LC_MESSAGES/django.po +1 -7
- wagtail/search/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/search/management/commands/update_index.py +1 -1
- wagtail/search/management/commands/wagtail_update_index.py +1 -1
- wagtail/search/models.py +1 -4
- wagtail/search/query.py +1 -1
- wagtail/search/queryset.py +1 -1
- wagtail/search/signal_handlers.py +1 -1
- wagtail/search/tasks.py +1 -1
- wagtail/search/utils.py +1 -1
- wagtail/sites/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/sites/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/af/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/az_AZ/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/en_IN/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/es_VE/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/fi/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/hi/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ht/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sr/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ta/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/tests/test_preview.py +75 -8
- wagtail/snippets/tests/test_snippets.py +12 -0
- wagtail/users/locale/ar/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/be/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/bg/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/bn/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ca/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/cs/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/cy/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/da/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/de/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/dv/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/el/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/es/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/es_419/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/et/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/eu/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/fa/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/fi/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/fi/LC_MESSAGES/django.po +6 -3
- wagtail/users/locale/fr/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/gl/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/he_IL/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/hr_HR/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/hu/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/hy/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/id_ID/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/is_IS/LC_MESSAGES/django.po +7 -3
- wagtail/users/locale/it/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ja/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ka/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ko/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/lt/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/lv/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/mi/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/mn/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/my/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/nb/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/nl/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/pl/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/pt_PT/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ro/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ru/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/sl/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/sv/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/tet/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/th/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/tr/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/tr_TR/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/ug/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/uk/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/vi/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/zh/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
- wagtail/users/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/METADATA +3 -3
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/RECORD +1238 -1237
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/WHEEL +1 -1
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/entry_points.txt +0 -0
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/licenses/LICENSE +0 -0
- {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/top_level.txt +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t={2294:(e,t,i)=>{var n=i(6931),s=i.n(n),l=i(2427),a=i.n(l),o=i(4327),r=i(1238),c=i(1002);class d{constructor(e,t,i,n,l,d){this.blockDef=e,this.type=e.name;const h=$(`\n <div class="w-field__wrapper" data-field-wrapper>\n <div class="${(0,o.Z)(this.blockDef.meta.classname)}" data-field>\n <div class="w-field__errors" id="${i}-errors" data-field-errors>\n <svg class="icon icon-warning w-field__errors-icon" aria-hidden="true" hidden><use href="#icon-warning"></use></svg>\n </div>\n <div class="w-field__help" id="${i}-helptext" data-field-help></div>\n <div class="w-field__input" data-field-input>\n <div data-streamfield-widget></div>\n </div>\n </div>\n </div>\n `);$(t).replaceWith(h);const u=h.find("[data-streamfield-widget]").get(0);this.element=h[0],this.field=this.element.querySelector("[data-field]"),this.parentCapabilities=d||new Map,this.prefix=i;const p={attributes:this.getAttributes()};try{this.widget=this.blockDef.widget.render(u,i,i,n,this.parentCapabilities,p)}catch(e){return console.error(e),void this.setError({messages:["This widget failed to render, please check the console for details."]})}if(this.idForLabel=this.widget.idForLabel,this.blockDef.meta.helpText){const e=document.createElement("p");e.classList.add("help"),e.innerHTML=this.blockDef.meta.helpText,this.field.querySelector("[data-field-help]").appendChild(e)}if(window.comments&&this.blockDef.meta.showAddCommentButton){const t=document.createElement("button");t.type="button",t.setAttribute("aria-label",e.meta.strings.ADD_COMMENT),t.setAttribute("data-comment-add",""),t.classList.add("w-field__comment-button","w-field__comment-button--add"),s().render(a().createElement(a().Fragment,null,a().createElement(r.A,{name:"comment-add"}),a().createElement(r.A,{name:"comment-add-reversed"})),t),this.field.classList.add("w-field--commentable"),this.field.querySelector("[data-field-input]").appendChild(t),window.comments.initAddCommentButton(t)}l&&this.setError(l),(0,c.$)(this.field,this.blockDef.meta.attrs||{})}setCapabilityOptions(e,t){Object.assign(this.parentCapabilities.get(e),t),this.widget&&this.widget.setCapabilityOptions&&this.widget.setCapabilityOptions(e,t)}setState(e){this.widget&&this.widget.setState(e)}setError(e){const t=this.field.querySelector("[data-field-errors]");if(t.querySelectorAll(".error-message").forEach(e=>e.remove()),this.widget?.setInvalid?.(!!e),e){this.field.classList.add("w-field--error"),t.querySelector(".icon").removeAttribute("hidden");const i=document.createElement("p");i.classList.add("error-message");const n=document.createTextNode(e.messages.join(" "));i.appendChild(n),t.appendChild(i)}else this.field.classList.remove("w-field--error"),t.querySelector(".icon").setAttribute("hidden","true")}getAttributes(){const e=this.prefix,t={};return this.blockDef.meta.helpText&&(t["aria-describedby"]=`${e}-helptext`),this.blockDef.meta.required&&(t.required=""),this.blockDef.meta.maxLength&&(t.maxLength=this.blockDef.meta.maxLength),t}getState(){return this.widget.getState()}getValue(){return this.widget.getValue()}getTextLabel(e){return this.widget.getTextLabel?this.widget.getTextLabel(e):null}focus(e){this.widget&&this.widget.focus(e)}}class h{constructor(e,t,i){this.name=e,this.widget=t,this.meta=i}render(e,t,i,n,s){return new d(this,e,t,i,n,s)}}class u{constructor(e,t){this.blockDef=e;const i=document.createElement("div");this.blockDef.meta.html?i.innerHTML=this.blockDef.meta.html:i.innerHTML=(0,o.Z)(this.blockDef.meta.text),t.replaceWith(i),(0,c.$)(i,this.blockDef.meta.attrs||{})}setState(e){}setError(e){}getState(){return null}getValue(){return null}focus(){}}class p{constructor(e,t){this.name=e,this.meta=t}render(e){return new u(this,e)}}var m=i(4188),b=i(4545),f=i(2833);class g{constructor(e){this.props=e}render(){const e=document.createElement("template"),{panelId:t,headingId:i,contentId:n,blockDef:s,blockTypeIcon:l,blockTypeLabel:a,collapsed:o}=this.props;return e.innerHTML=`\n <section class="w-panel w-panel--nested${o?" collapsed":""}" id="${t}" aria-labelledby="${i}" data-panel>\n <div class="w-panel__header">\n <a class="w-panel__anchor w-panel__anchor--prefix" href="#${t}" aria-labelledby="${i}" data-panel-anchor>\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <button class="w-panel__toggle" type="button" aria-label="${(0,f.AP)("Toggle section")}" aria-describedby="${i}" data-panel-toggle aria-controls="${n}" aria-expanded="true">\n <svg class="icon icon-${l} w-panel__icon" aria-hidden="true">\n <use href="#icon-${l}"></use>\n </svg>\n </button>\n <h2 class="w-panel__heading w-panel__heading--label" aria-level="3" id="${i}" data-panel-heading>\n <span class="c-sf-block__type">${a}</span>\n ${s?.meta.required?'<span class="w-required-mark" data-panel-required>*</span>':""}\n <span data-panel-heading-text class="c-sf-block__title"></span>\n </h2>\n <a class="w-panel__anchor w-panel__anchor--suffix" href="#${t}" aria-labelledby="${i}">\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <div class="w-panel__divider"></div>\n <div class="w-panel__controls" data-panel-controls></div>\n </div>\n <div id="${n}" class="w-panel__content">\n ${s?"<div data-streamfield-block></div>":""}\n </div>\n </section>\n `,e.content.firstElementChild}}const k=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const i=document.querySelector(`#${e.getAttribute("aria-controls")}`);i&&(e.setAttribute("aria-expanded",`${t}`),t?i.removeAttribute("hidden"):"onbeforematch"in document.body?i.setAttribute("hidden","until-found"):i.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function v(e){const t=e.closest("[data-panel]"),i=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!i||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const n=k.bind(null,e),s=t.classList.contains("collapsed"),l=i.querySelector('[aria-invalid="true"], .error, .w-field--error'),a=s&&!l;a&&n(!1),e.addEventListener("click",n.bind(null,void 0));const o=t.querySelector("[data-panel-heading]");o&&o.addEventListener("click",n.bind(null,void 0)),i.addEventListener("beforematch",n.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!a}}))}class w{constructor(e,t,i,n,s){const l=n||{};this.blockDef=e,this.type=e.name,this.childBlocks={};let a="";if(this.blockDef.collapsible&&(a=new g({panelId:i+"-section",headingId:i+"-heading",contentId:i+"-content",blockTypeIcon:(0,o.Z)(e.meta.icon),blockTypeLabel:(0,o.Z)(e.meta.label),collapsed:e.meta.collapsed}).render().outerHTML),e.meta.formTemplate){const n=e.meta.formTemplate.replace(/__PREFIX__/g,i);let o;a?(o=$(a),$(t).replaceWith(o),o=this.#e(o,i),o.append(n)):(o=$(n),$(t).replaceWith(o));const r=s?.blockErrors||{};this.blockDef.childBlockDefs.forEach(e=>{const t=o.find('[data-structblock-child="'+e.name+'"]').get(0),n=e.render(t,i+"-"+e.name,l[e.name],r[e.name]);this.childBlocks[e.name]=n}),this.container=o}else{let e=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n </div>\n `);e.append(a),$(t).replaceWith(e),this.blockDef.collapsible&&(e=this.#e(e,i)),this.blockDef.meta.helpText&&e.append(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `),this.blockDef.childBlockDefs.forEach(t=>{let n="";t instanceof this.blockDef.constructor||(n=`<label class="w-field__label">${(0,o.Z)(t.meta.label)}${t.meta.required?'<span class="w-required-mark">*</span>':""}</label>`);const a=$(`\n <div data-contentpath="${t.name}">\n ${n}\n <div data-streamfield-block></div>\n </div>\n `);e.append(a);const r=a.find("[data-streamfield-block]").get(0),c=a.find("label").get(0),d=s?.blockErrors||{},h=t.render(r,i+"-"+t.name,l[t.name],d[t.name],new Map);this.childBlocks[t.name]=h,h.idForLabel&&c.setAttribute("for",h.idForLabel)}),this.container=e}this.blockDef.collapsible&&this.setTextLabel(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}#e(e,t){const i=e.find("[data-panel-toggle]")[0],n=e.find("[data-panel-heading-text]")[0];return v(i),this.setTextLabel=()=>{const e=this.getTextLabel({maxLength:50});n.textContent=e||""},i.addEventListener("wagtail:panel-toggle",this.setTextLabel),e.find(`#${t}-content`)}setState(e){for(const t in e)this.childBlocks[t].setState(e[t])}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.childBlocks[t].setError(e.blockErrors[t])}getState(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getState();return e}getDuplicatedState(){const e={};for(const t in this.childBlocks){const i=this.childBlocks[t];e[t]=void 0===i.getDuplicatedState?i.getState():i.getDuplicatedState()}return e}getValue(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getValue();return e}getTextLabel(e){if("string"==typeof this.blockDef.meta.labelFormat)return this.blockDef.meta.labelFormat.replace(/\{(\w+)\}/g,(t,i)=>{const n=this.childBlocks[i];return n&&n.getTextLabel?n.getTextLabel(e):""});for(const t of this.blockDef.childBlockDefs){const i=this.childBlocks[t.name];if(i.getTextLabel){const t=i.getTextLabel(e);if(t)return t}}return null}focus(e){if(this.blockDef.childBlockDefs.length){const t=this.blockDef.childBlockDefs[0].name;this.childBlocks[t].focus(e)}}}class D{constructor(e,t,i){this.name=e,this.childBlockDefs=t,this.meta=i,this.collapsible=!0}render(e,t,i,n){return new w(this,e,t,i,n)}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let y;const C=new Uint8Array(16),E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));const B=function(e,t,i){if(x.randomUUID&&!t&&!e)return x.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!y){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");y=crypto.getRandomValues.bind(crypto)}return y(C)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=n[e];return t}return function(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}(n)};var _=i(246),S=i(9675);class I{constructor(e){this.sequenceChild=e}render(e){const t=this.sequenceChild.strings[this.labelIdentifier]||this.labelIdentifier;this.dom=$(`\n <button type="button" class="button button--icon text-replace white" data-streamfield-action="${this.labelIdentifier}" title="${(0,o.Z)(t)}">\n <svg class="icon icon-${(0,o.Z)(this.icon)}" aria-hidden="true">\n <use href="#icon-${(0,o.Z)(this.icon)}"></use>\n </svg>\n </button>\n `),this.dom.on("click",()=>(this.onClick&&this.onClick(),!1)),$(e).append(this.dom),this.enableEvent&&this.sequenceChild.addEventListener(this.enableEvent,()=>{this.enable()}),this.disableEvent&&this.sequenceChild.addEventListener(this.disableEvent,()=>{this.disable()}),this.initiallyDisabled&&this.disable()}enable(){this.dom.removeAttr("disabled")}disable(){this.dom.attr("disabled","true")}}class q extends I{enableEvent="enableMoveUp";disableEvent="disableMoveUp";initiallyDisabled=!0;icon="arrow-up";labelIdentifier="MOVE_UP";onClick(){this.sequenceChild.moveUp()}}class L extends I{enableEvent="enableMoveDown";disableEvent="disableMoveDown";initiallyDisabled=!0;icon="arrow-down";labelIdentifier="MOVE_DOWN";onClick(){this.sequenceChild.moveDown()}}class T extends I{enableEvent="enableDrag";disableEvent="disableDrag";initiallyDisabled=!1;icon="grip";labelIdentifier="DRAG"}class A extends I{enableEvent="enableDuplication";disableEvent="disableDuplication";icon="copy";labelIdentifier="DUPLICATE";onClick(){this.sequenceChild.duplicate({animate:!0})}}class M extends I{icon="bin";labelIdentifier="DELETE";onClick(){this.sequenceChild.delete({animate:!0})}}class U extends EventTarget{constructor(e,t,i,n,s,l,a,r){super(),this.blockDef=e,this.type=e.name,this.prefix=i,this.index=n,this.id=s,this.sequence=a;const c=r&&r.animate,d=r&&r.focus,h=r&&r.collapsed;this.strings=r&&r.strings||{};const u=`block-${s}-section`,p=`block-${s}-heading`,m=`block-${s}-content`,b=(0,o.Z)(this.blockDef.meta.icon),f=(0,o.Z)(this.blockDef.meta.label),k=new g({panelId:u,headingId:p,contentId:m,blockDef:e,blockTypeIcon:b,blockTypeLabel:f}).render(),w=$(`\n <div data-streamfield-child ${this.id?`data-contentpath="${(0,o.Z)(this.id)}"`:"data-contentpath-disabled"}>\n <input type="hidden" name="${this.prefix}-deleted" value="">\n <input type="hidden" name="${this.prefix}-order" value="${n}">\n <input type="hidden" name="${this.prefix}-type" value="${(0,o.Z)(this.type||"")}">\n <input type="hidden" name="${this.prefix}-id" value="${(0,o.Z)(this.id||"")}">\n ${k.outerHTML}\n </div>\n `);$(t).replaceWith(w),this.element=w.get(0);const x=w.find("[data-streamfield-block]").get(0);this.actionsContainerElement=w.find("[data-panel-controls]").get(0),this.titleElement=w.find("[data-panel-heading-text]"),this.toggleElement=this.element.querySelector("[data-panel-toggle]"),this.deletedInput=w.find(`input[name="${this.prefix}-deleted"]`),this.indexInput=w.find(`input[name="${this.prefix}-order"]`),this.addActionButton(new q(this)),this.addActionButton(new L(this)),this.addActionButton(new T(this)),this.addActionButton(new A(this)),this.addActionButton(new M(this));const y=new Map;y.set("duplicate",{enabled:!0,fn:this.duplicate}),y.set("split",{enabled:!0,fn:this.split.bind(this)}),y.set("addSibling",{enabled:!0,fn:this.addSibling.bind(this),blockGroups:this.sequence.getBlockGroups(),getBlockCount:this.sequence.getBlockCount.bind(this.sequence),getBlockMax:this.sequence.getBlockMax.bind(this.sequence)}),this.blockDef instanceof D&&(this.blockDef.collapsible=!1),this.block=this.blockDef.render(x,this.prefix+"-value",l,void 0,y),v(this.element.querySelector("[data-panel-toggle]")),h&&this.collapse(),this.toggleElement.addEventListener("wagtail:panel-toggle",()=>{const e=this.getTextLabel({maxLength:70});this.titleElement.text(e||"")});const C=this.getTextLabel({maxLength:70});this.titleElement.text(C||""),c?(w.hide(),setTimeout(()=>{w.slideDown(),d&&this.block.focus({soft:!0})},10)):d&&this.block.focus({soft:!0})}addActionButton(e){e.render(this.actionsContainerElement)}addSibling(e){this.sequence._onRequestInsert(this.index+1,e)}moveUp(){this.sequence.moveBlockUp(this.index)}moveDown(){this.sequence.moveBlockDown(this.index)}duplicate(e){this.sequence.duplicateBlock(this.index,e)}delete(e){this.sequence.deleteBlock(this.index,e)}markDeleted({animate:e=!1}){this.deletedInput.val("1"),e?$(this.element).slideUp().dequeue().fadeOut().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true");const t=this.getContentPath();t&&window.comments.commentApp&&window.comments.commentApp.invalidateContentPath(t)}getContentPath(){return window.comments?.getContentPath(this.element)}enableDuplication(){this.dispatchEvent(new Event("enableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!0})}disableDuplication(){this.dispatchEvent(new Event("disableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!1})}enableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!0})}disableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!1})}enableMoveUp(){this.dispatchEvent(new Event("enableMoveUp"))}disableMoveUp(){this.dispatchEvent(new Event("disableMoveUp"))}enableMoveDown(){this.dispatchEvent(new Event("enableMoveDown"))}disableMoveDown(){this.dispatchEvent(new Event("disableMoveDown"))}setIndex(e){this.index=e,this.indexInput.val(e)}setError(e){this.block.setError(e),e&&k(this.toggleElement,!0)}focus(e){this.block.focus(e)}getTextLabel(e){return this.block.getTextLabel?this.block.getTextLabel(e):null}collapse(){k(this.toggleElement,!1)}getDuplicatedState(){return{id:B(),value:void 0===this.block.getDuplicatedState?this.block.getState():this.block.getDuplicatedState()}}}class O{constructor(e,t){this.index=t&&t.index,this.onRequestInsert=t&&t.onRequestInsert}setIndex(e){this.index=e}delete({animate:e=!1}){e?$(this.element).slideUp().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true")}}class P{_createChild(e,t,i,n,s,l,a,o){throw new Error("not implemented")}_createInsertionControl(e,t){throw new Error("not implemented")}_getChildDataForInsertion(e){throw new Error("not implemented")}getBlockGroups(){throw new Error("not implemented")}clear(){this.countInput.val(0),this.sequenceContainer.empty(),this.children=[],this.blockCounter=0;const e=document.createElement("div");this.sequenceContainer.append(e),this.inserters=[this._createInsertionControl(e,{index:0,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings})],this.blockCountChanged()}_onRequestInsert(e,t){const[i,n,s]=this._getChildDataForInsertion(t);this._insert(i,n,s||null,e,{animate:!0,focus:!0})}blockCountChanged(){}_insert(e,t,i,n,s){const l=this.prefix+"-"+this.blockCounter,a=s&&s.animate,o=s&&s.focus,r=s&&s.collapsed;this.blockCounter+=1;const c=this.inserters[n].element,d=document.createElement("div"),h=document.createElement("div");$(d).insertAfter(c),$(h).insertAfter(d),(0,S.y)(n,this.children.length).forEach(e=>{this.children[e].setIndex(e+1)}),(0,S.y)(n+1,this.inserters.length).forEach(e=>{this.inserters[e].setIndex(e+1)});const u=this._createChild(e,d,l,n,i,t,this,{animate:a,focus:o,collapsed:r,strings:this.blockDef.meta.strings});this.children.splice(n,0,u);const p=this._createInsertionControl(h,{index:n+1,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings,animate:a});this.inserters.splice(n+1,0,p),this.countInput.val(this.blockCounter);const m=0===n,b=n===this.children.length-1;return m||(u.enableMoveUp(),b&&this.children[n-1].enableMoveDown()),b||(u.enableMoveDown(),m&&this.children[n+1].enableMoveUp()),this.blockCountChanged(),u}deleteBlock(e,t){const i=t&&t.animate;this.children[e].markDeleted({animate:i}),this.inserters[e].delete({animate:i}),this.children.splice(e,1),this.inserters.splice(e,1),(0,S.y)(e,this.children.length).forEach(e=>{this.children[e].setIndex(e)}),(0,S.y)(e,this.inserters.length).forEach(e=>{this.inserters[e].setIndex(e)}),0===e&&this.children.length>0&&this.children[0].disableMoveUp(),e===this.children.length&&this.children.length>0&&this.children[this.children.length-1].disableMoveDown(),this.blockCountChanged()}initDragNDrop(){this.sortable=_.Ay.create(this.sequenceContainer.get(0),{handle:'[data-streamfield-action="DRAG"]',animation:200,draggable:"[data-streamfield-child]",onEnd:e=>{const{oldDraggableIndex:t,newDraggableIndex:i}=e;t!==i&&this.moveBlock(t,i)},setData:e=>{e.setData("application/vnd.wagtail.type","sf-block")}})}moveBlock(e,t){if(e===t)return;const i=this.inserters[e],n=this.children[e];t>e?$(i.element).insertAfter(this.children[t].element):$(i.element).insertBefore(this.inserters[t].element),$(n.element).insertAfter(i.element),this.inserters.splice(e,1),this.inserters.splice(t,0,i),this.children.splice(e,1),this.children.splice(t,0,n),t>e?(0,S.y)(e,t+1).forEach(e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)}):(0,S.y)(t,e+1).forEach(e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)});const s=this.children.length-1;0===e&&(n.enableMoveUp(),this.children[0].disableMoveUp()),e===s&&(n.enableMoveDown(),this.children[s].disableMoveDown()),0===t&&(n.disableMoveUp(),this.children[1].enableMoveUp()),t===s&&(n.disableMoveDown(),this.children[s-1].enableMoveDown())}moveBlockUp(e){this.moveBlock(e,e-1)}moveBlockDown(e){this.moveBlock(e,e+1)}setState(e){this.clear(),e.forEach((e,t)=>{this.insert(e,t)})}getState(){return this.children.map(e=>e.getState())}getDuplicatedState(){return this.children.map(e=>e.getDuplicatedState())}getValue(){return this.children.map(e=>e.getValue())}getTextLabel(e){const t=e&&e.maxLength;let i="";for(const e of this.children){const n=e.getTextLabel({maxLength:t});if(n)if(i){const e=i+", "+n;if(t&&e.length>t-1)return i.endsWith("…")||(i+="…"),i;i=e}else i=n}return i}focus(e){this.children.length&&this.children[0].focus(e)}}class R extends U{getState(){return{id:this.id||null,value:this.block.getState()}}getValue(){return this.block.getValue()}setState({value:e,id:t}){this.block.setState(e),this.id=void 0===t?null:t}setValue(e){this.block.setState(e)}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class F extends O{constructor(e,t){super(e,t),this.onRequestInsert=t&&t.onRequestInsert;const i=t&&t.animate,n=(0,o.Z)(t.strings.ADD),s=$(`\n <button type="button" title="${n}" data-streamfield-list-add class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n `);$(e).replaceWith(s),this.element=s.get(0),s.click(()=>{this.onRequestInsert&&this.onRequestInsert(this.index)}),i&&s.hide().slideDown()}enable(){$(this.element).removeAttr("disabled")}disable(){$(this.element).attr("disabled","true")}}class V extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-list-count value="0">\n\n <div data-streamfield-list-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.children=[],this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-list-count]"),this.sequenceContainer=l.find("[data-streamfield-list-container]"),this.container=l,this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach(e=>{e.collapse()}),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}setState(e){this.clear(),e.forEach(({value:e,id:t},i)=>{const n=void 0===t?B():t;this.insert(e,i,{id:t||n})})}_getChildDataForInsertion(){return[this.blockDef.childBlockDef,this.blockDef.initialChildState,B()]}_createChild(e,t,i,n,s,l,a,o){return new R(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return new F(e,t)}blockCountChanged(){super.blockCountChanged();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}e.length?this.setError({messages:e}):this.setError({})}insert(e,t,i){return this._insert(this.blockDef.childBlockDef,e,i?.id,t,i)}duplicateBlock(e,t){const i=this.children[e],{id:n,value:s}=i.getDuplicatedState(),l=t&&t.animate;this.insert(s,e+1,{animate:l,focus:!0,collapsed:i.collapsed,id:n})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate;l.setValue(t);const o=this.insert(i,e+1,{animate:a,focus:!0,collapsed:l.collapsed}),r=l.getContentPath(),c=o.getContentPath(),d=window.comments?.commentApp;r&&c&&d&&d.utils.selectCommentsForContentPathFactory(r)(d.store.getState()).forEach(e=>{n(e)&&d.updateContentPath(e.localId,c)})}setError(e){if(!e)return;const t=this.container[0];(0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors&&Object.entries(e.blockErrors).forEach(([e,t])=>{this.children[e].setError(t)})}getBlockGroups(){return[["",[this.blockDef.childBlockDef]]]}getBlockCount(){return this.children.length}getBlockMax(){return this.blockDef.meta.maxNum||0}}class Z{constructor(e,t,i,n){this.name=e,this.childBlockDef=t,this.initialChildState=i,this.meta=n}render(e,t,i,n){return new V(this,e,t,i,n)}}var N=i(7381),j=i(4549),W=i(2891);const H={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(t){"Escape"===t.key&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}};W.Controller;class G extends U{getState(){return{type:this.type,value:this.block.getState(),id:this.id||null}}getDuplicatedState(){return{...super.getDuplicatedState(),type:this.type}}setState({type:e,value:t,id:i}){this.type=e,this.block.setState(t),this.id=void 0===i?null:i}getValue(){return{type:this.type,value:this.block.getValue(),id:this.id||null}}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class z extends O{constructor(e,t){super(e,t),this.groupedChildBlockDefs=t.groupedChildBlockDefs;const i=$(`\n <div>\n <button type="button" title="${j.Mn}" class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n </div>\n `);$(e).replaceWith(i),this.element=i.get(0),this.addButton=i.find("button");const n=this.blockItems;1!==n.length||1!==n[0].items.length?(this.combobox=document.createElement("div"),this.tooltip=(0,N.Ay)(this.addButton.get(0),{content:this.combobox,trigger:"click",interactive:!0,maxWidth:"none",theme:"dropdown",arrow:!1,placement:"bottom",plugins:[H],onShow:this.renderMenu.bind(this),onHidden:()=>{s().render(null,this.combobox)}})):this.addButton.click(()=>{this.onRequestInsert&&this.onRequestInsert(this.index,n[0].items[0])})}get blockItems(){return this.groupedChildBlockDefs.map(([e,t])=>({label:e||"",type:e||"",items:t.map(e=>({type:e.name,label:e.meta.label,description:e.meta.description,icon:e.meta.icon,blockDefId:e.meta.blockDefId,isPreviewable:e.meta.isPreviewable}))}))}renderMenu(){const e=this.blockItems;s().render(a().createElement(j.Ay,{label:j.qc,placeholder:j.qc,items:e,getItemLabel:(e,t)=>t.label,getItemDescription:e=>e.label,getSearchFields:e=>[e.label,e.type],noResultsText:j.b5,onSelect:this.onSelectBlock.bind(this)}),this.combobox)}onSelectBlock(e){this.onRequestInsert&&this.onRequestInsert(this.index,{type:e.selectedItem.type}),this.close()}open(){this.addButton.attr("aria-expanded","true"),this.tooltip.show()}close(){this.addButton.attr("aria-expanded","false"),this.tooltip.hide()}}class X extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-stream-count value="0">\n <div data-streamfield-stream-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.container=l,this.element=l.get(0),this.children=[],this.childBlockCounts=new Map,this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-stream-count]"),this.sequenceContainer=l.find("[data-streamfield-stream-container]"),this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach(e=>{e.collapse()}),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}getBlockGroups(){return this.blockDef.groupedChildBlockDefs}getBlockCount(e){return e?(this.childBlockCounts.has(e)||this._updateBlockCount(e),this.childBlockCounts.get(e)||0):this.children.length}getBlockMax(e){return e?this.blockDef.meta.blockCounts[e]?.max_num:this.blockDef.meta.maxNum}_updateBlockCount(e){const t=this.children.filter(t=>t.type===e).length;this.childBlockCounts.set(e,t)}blockCountChanged(){super.blockCountChanged(),this.childBlockCounts.clear();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}for(const[t,i]of Object.entries(this.blockDef.meta.blockCounts)){const n=i.max_num;if("number"==typeof n&&this.getBlockCount(t)>n){const i=this.blockDef.childBlockDefsByName[t],s=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${n}`),l=`${i.meta.label}: ${s}`;e.push(l)}const s=i.min_num;if("number"==typeof s&&this.getBlockCount(t)<s){const i=this.blockDef.childBlockDefsByName[t],n=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${s}`),l=`${i.meta.label}: ${n}`;e.push(l)}}e.length?this.setError({messages:e}):this.setError({})}_createChild(e,t,i,n,s,l,a,o){return new G(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return t.groupedChildBlockDefs=this.blockDef.groupedChildBlockDefs,new z(e,t)}insert({type:e,value:t,id:i},n,s){const l=this.blockDef.childBlockDefsByName[e];return this._insert(l,t,i,n,s)}_getChildDataForInsertion({type:e}){return[this.blockDef.childBlockDefsByName[e],this.blockDef.initialChildStates[e],B()]}duplicateBlock(e,t){const i=this.children[e],n=i.getDuplicatedState(),s=t&&t.animate;this.insert(n,e+1,{animate:s,focus:!0,collapsed:i.collapsed})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate,o=l.getState(),r=this.insert({type:o.type,id:B(),value:i},e+1,{animate:a,focus:!0,collapsed:l.collapsed});l.setState({type:o.type,id:o.id||null,value:t});const c=l.getContentPath(),d=r.getContentPath(),h=window.comments?.commentApp;c&&d&&h&&h.utils.selectCommentsForContentPathFactory(c)(h.store.getState()).forEach(e=>{n(e)&&h.updateContentPath(e.localId,d)})}setState(e){super.setState(e)}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.children[t].setError(e.blockErrors[t])}}class J{constructor(e,t,i,n){this.name=e,this.groupedChildBlockDefs=t,this.initialChildStates=i,this.childBlockDefsByName={},this.groupedChildBlockDefs.forEach(([e,t])=>{t.forEach(e=>{this.childBlockDefsByName[e.name]=e})}),this.meta=n}render(e,t,i,n){return new X(this,e,t,i,n)}}const K=window.wagtailStreamField||{};K.blocks={FieldBlock:d,FieldBlockDefinition:h,StaticBlock:u,StaticBlockDefinition:p,StructBlock:w,StructBlockDefinition:D,ListBlock:V,ListBlockDefinition:Z,StreamBlock:X,StreamBlockDefinition:J},window.telepath.register("wagtail.blocks.FieldBlock",h),window.telepath.register("wagtail.blocks.StaticBlock",p),window.telepath.register("wagtail.blocks.StructBlock",D),window.telepath.register("wagtail.blocks.ListBlock",Z),window.telepath.register("wagtail.blocks.StreamBlock",J),window.wagtailStreamField=K}},i={};function n(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,i,s,l)=>{if(!i){var a=1/0;for(d=0;d<e.length;d++){for(var[i,s,l]=e[d],o=!0,r=0;r<i.length;r++)(!1&l||a>=l)&&Object.keys(n.O).every(e=>n.O[e](i[r]))?i.splice(r--,1):(o=!1,l<a&&(a=l));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[i,s,l]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=591,(()=>{var e={591:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var s,l,[a,o,r]=i,c=0;if(a.some(t=>0!==e[t])){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(r)var d=r(n)}for(t&&t(i);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},i=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=n.O(void 0,[321],()=>n(2294));s=n.O(s)})();
|
|
1
|
+
(()=>{"use strict";var e,t={2294:(e,t,i)=>{var n=i(6931),s=i.n(n),l=i(2427),a=i.n(l),o=i(4327),r=i(1238),c=i(1002);class d{constructor(e,t,i,n,l,d){this.blockDef=e,this.type=e.name;const h=$(`\n <div class="w-field__wrapper" data-field-wrapper>\n <div class="${(0,o.Z)(this.blockDef.meta.classname)}" data-field>\n <div class="w-field__errors" id="${i}-errors" data-field-errors>\n <svg class="icon icon-warning w-field__errors-icon" aria-hidden="true" hidden><use href="#icon-warning"></use></svg>\n </div>\n <div class="w-field__help" id="${i}-helptext" data-field-help></div>\n <div class="w-field__input" data-field-input>\n <div data-streamfield-widget></div>\n </div>\n </div>\n </div>\n `);$(t).replaceWith(h);const u=h.find("[data-streamfield-widget]").get(0);this.element=h[0],this.field=this.element.querySelector("[data-field]"),this.parentCapabilities=d||new Map,this.prefix=i;const p={attributes:this.getAttributes()};try{this.widget=this.blockDef.widget.render(u,i,i,n,this.parentCapabilities,p)}catch(e){return console.error(e),void this.setError({messages:["This widget failed to render, please check the console for details."]})}if(this.idForLabel=this.widget.idForLabel,this.blockDef.meta.helpText){const e=document.createElement("p");e.classList.add("help"),e.innerHTML=this.blockDef.meta.helpText,this.field.querySelector("[data-field-help]").appendChild(e)}if(window.comments&&this.blockDef.meta.showAddCommentButton){const t=document.createElement("button");t.type="button",t.setAttribute("aria-label",e.meta.strings.ADD_COMMENT),t.setAttribute("data-comment-add",""),t.classList.add("w-field__comment-button","w-field__comment-button--add"),s().render(a().createElement(a().Fragment,null,a().createElement(r.A,{name:"comment-add"}),a().createElement(r.A,{name:"comment-add-reversed"})),t),this.field.classList.add("w-field--commentable"),this.field.querySelector("[data-field-input]").appendChild(t),window.comments.initAddCommentButton(t)}l&&this.setError(l),(0,c.$)(this.field,this.blockDef.meta.attrs||{})}setCapabilityOptions(e,t){Object.assign(this.parentCapabilities.get(e),t),this.widget&&this.widget.setCapabilityOptions&&this.widget.setCapabilityOptions(e,t)}setState(e){this.widget&&this.widget.setState(e)}setError(e){const t=this.field.querySelector("[data-field-errors]");if(t.querySelectorAll(".error-message").forEach(e=>e.remove()),this.widget?.setInvalid?.(!!e),e){this.field.classList.add("w-field--error"),t.querySelector(".icon").removeAttribute("hidden");const i=document.createElement("p");i.classList.add("error-message");const n=document.createTextNode(e.messages.join(" "));i.appendChild(n),t.appendChild(i)}else this.field.classList.remove("w-field--error"),t.querySelector(".icon").setAttribute("hidden","true")}getAttributes(){const e=this.prefix,t={};return this.blockDef.meta.helpText&&(t["aria-describedby"]=`${e}-helptext`),this.blockDef.meta.required&&(t.required=""),this.blockDef.meta.maxLength&&(t.maxLength=this.blockDef.meta.maxLength),t}getState(){return this.widget.getState()}getValue(){return this.widget.getValue()}getTextLabel(e){return this.widget.getTextLabel?this.widget.getTextLabel(e):null}focus(e){this.widget&&this.widget.focus(e)}}class h{constructor(e,t,i){this.name=e,this.widget=t,this.meta=i}render(e,t,i,n,s){return new d(this,e,t,i,n,s)}}class u{constructor(e,t){this.blockDef=e;const i=document.createElement("div");this.blockDef.meta.html?i.innerHTML=this.blockDef.meta.html:i.innerHTML=(0,o.Z)(this.blockDef.meta.text),t.replaceWith(i),(0,c.$)(i,this.blockDef.meta.attrs||{})}setState(e){}setError(e){}getState(){return null}getValue(){return null}focus(){}}class p{constructor(e,t){this.name=e,this.meta=t}render(e){return new u(this,e)}}var m=i(4188),b=i(4545),f=i(2833);class g{constructor(e){this.props=e}render(){const e=document.createElement("template"),{panelId:t,headingId:i,contentId:n,blockDef:s,blockTypeIcon:l,blockTypeLabel:a,collapsed:o}=this.props;return e.innerHTML=`\n <section class="w-panel w-panel--nested${o?" collapsed":""}" id="${t}" aria-labelledby="${i}" data-panel>\n <div class="w-panel__header">\n <a class="w-panel__anchor w-panel__anchor--prefix" href="#${t}" aria-labelledby="${i}" data-panel-anchor>\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <button class="w-panel__toggle" type="button" aria-label="${(0,f.AP)("Toggle section")}" aria-describedby="${i}" data-panel-toggle aria-controls="${n}" aria-expanded="true">\n <svg class="icon icon-${l} w-panel__icon" aria-hidden="true">\n <use href="#icon-${l}"></use>\n </svg>\n </button>\n <h2 class="w-panel__heading w-panel__heading--label" aria-level="3" id="${i}" data-panel-heading>\n <span class="c-sf-block__type">${a}</span>\n ${s?.meta.required?'<span class="w-required-mark" data-panel-required>*</span>':""}\n <span data-panel-heading-text class="c-sf-block__title"></span>\n </h2>\n <a class="w-panel__anchor w-panel__anchor--suffix" href="#${t}" aria-labelledby="${i}">\n <svg class="icon icon-link w-panel__icon" aria-hidden="true">\n <use href="#icon-link"></use>\n </svg>\n </a>\n <div class="w-panel__divider"></div>\n <div class="w-panel__controls" data-panel-controls></div>\n </div>\n <div id="${n}" class="w-panel__content">\n ${s?"<div data-streamfield-block></div>":""}\n </div>\n </section>\n `,e.content.firstElementChild}}const k=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const i=document.querySelector(`#${e.getAttribute("aria-controls")}`);i&&(e.setAttribute("aria-expanded",`${t}`),t?i.removeAttribute("hidden"):"onbeforematch"in document.body?i.setAttribute("hidden","until-found"):i.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function v(e){const t=e.closest("[data-panel]"),i=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!i||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const n=k.bind(null,e),s=t.classList.contains("collapsed"),l=i.querySelector('[aria-invalid="true"], .error, .w-field--error'),a=s&&!l;a&&n(!1),e.addEventListener("click",n.bind(null,void 0));const o=t.querySelector("[data-panel-heading]");o&&o.addEventListener("click",n.bind(null,void 0)),i.addEventListener("beforematch",n.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!a}}))}class w{constructor(e,t,i,n,s){const l=n||{};this.blockDef=e,this.type=e.name,this.childBlocks={};let a="";if(this.blockDef.collapsible&&(a=new g({panelId:`block_group-${i}-section`,headingId:`block_group-${i}-heading`,contentId:`block_group-${i}-content`,blockTypeIcon:(0,o.Z)(e.meta.icon),blockTypeLabel:(0,o.Z)(e.meta.label),collapsed:e.meta.collapsed}).render().outerHTML),e.meta.formTemplate){const n=e.meta.formTemplate.replace(/__PREFIX__/g,i);let o;a?(o=$(a),$(t).replaceWith(o),o=this.#e(o,i),o.append(n)):(o=$(n),$(t).replaceWith(o));const r=s?.blockErrors||{};this.blockDef.childBlockDefs.forEach(e=>{const t=o.find('[data-structblock-child="'+e.name+'"]').get(0),n=e.render(t,i+"-"+e.name,l[e.name],r[e.name]);this.childBlocks[e.name]=n}),this.container=o}else{let e=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n </div>\n `);e.append(a),$(t).replaceWith(e),this.blockDef.collapsible&&(e=this.#e(e,i)),this.blockDef.meta.helpText&&e.append(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `),this.blockDef.childBlockDefs.forEach(t=>{let n="";t instanceof this.blockDef.constructor||(n=`<label class="w-field__label">${(0,o.Z)(t.meta.label)}${t.meta.required?'<span class="w-required-mark">*</span>':""}</label>`);const a=$(`\n <div data-contentpath="${t.name}">\n ${n}\n <div data-streamfield-block></div>\n </div>\n `);e.append(a);const r=a.find("[data-streamfield-block]").get(0),c=a.find("label").get(0),d=s?.blockErrors||{},h=t.render(r,i+"-"+t.name,l[t.name],d[t.name],new Map);this.childBlocks[t.name]=h,h.idForLabel&&c.setAttribute("for",h.idForLabel)}),this.container=e}this.blockDef.collapsible&&this.setTextLabel(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}#e(e,t){const i=e.find("[data-panel-toggle]")[0],n=e.find("[data-panel-heading-text]")[0];return v(i),this.setTextLabel=()=>{const e=this.getTextLabel({maxLength:50});n.textContent=e||""},i.addEventListener("wagtail:panel-toggle",this.setTextLabel),e.find(`#block_group-${t}-content`)}setState(e){for(const t in e)this.childBlocks[t].setState(e[t])}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.childBlocks[t].setError(e.blockErrors[t])}getState(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getState();return e}getDuplicatedState(){const e={};for(const t in this.childBlocks){const i=this.childBlocks[t];e[t]=void 0===i.getDuplicatedState?i.getState():i.getDuplicatedState()}return e}getValue(){const e={};for(const t in this.childBlocks)e[t]=this.childBlocks[t].getValue();return e}getTextLabel(e){if("string"==typeof this.blockDef.meta.labelFormat)return this.blockDef.meta.labelFormat.replace(/\{(\w+)\}/g,(t,i)=>{const n=this.childBlocks[i];return n&&n.getTextLabel?n.getTextLabel(e):""});for(const t of this.blockDef.childBlockDefs){const i=this.childBlocks[t.name];if(i.getTextLabel){const t=i.getTextLabel(e);if(t)return t}}return null}focus(e){if(this.blockDef.childBlockDefs.length){const t=this.blockDef.childBlockDefs[0].name;this.childBlocks[t].focus(e)}}}class D{constructor(e,t,i){this.name=e,this.childBlockDefs=t,this.meta=i,this.collapsible=!0}render(e,t,i,n){return new w(this,e,t,i,n)}}const x={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let y;const C=new Uint8Array(16),E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));const B=function(e,t,i){if(x.randomUUID&&!t&&!e)return x.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!y){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");y=crypto.getRandomValues.bind(crypto)}return y(C)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((i=i||0)<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[i+e]=n[e];return t}return function(e,t=0){return(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase()}(n)};var _=i(246),S=i(9675);class I{constructor(e){this.sequenceChild=e}render(e){const t=this.sequenceChild.strings[this.labelIdentifier]||this.labelIdentifier;this.dom=$(`\n <button type="button" class="button button--icon text-replace white" data-streamfield-action="${this.labelIdentifier}" title="${(0,o.Z)(t)}">\n <svg class="icon icon-${(0,o.Z)(this.icon)}" aria-hidden="true">\n <use href="#icon-${(0,o.Z)(this.icon)}"></use>\n </svg>\n </button>\n `),this.dom.on("click",()=>(this.onClick&&this.onClick(),!1)),$(e).append(this.dom),this.enableEvent&&this.sequenceChild.addEventListener(this.enableEvent,()=>{this.enable()}),this.disableEvent&&this.sequenceChild.addEventListener(this.disableEvent,()=>{this.disable()}),this.initiallyDisabled&&this.disable()}enable(){this.dom.removeAttr("disabled")}disable(){this.dom.attr("disabled","true")}}class q extends I{enableEvent="enableMoveUp";disableEvent="disableMoveUp";initiallyDisabled=!0;icon="arrow-up";labelIdentifier="MOVE_UP";onClick(){this.sequenceChild.moveUp()}}class L extends I{enableEvent="enableMoveDown";disableEvent="disableMoveDown";initiallyDisabled=!0;icon="arrow-down";labelIdentifier="MOVE_DOWN";onClick(){this.sequenceChild.moveDown()}}class T extends I{enableEvent="enableDrag";disableEvent="disableDrag";initiallyDisabled=!1;icon="grip";labelIdentifier="DRAG"}class A extends I{enableEvent="enableDuplication";disableEvent="disableDuplication";icon="copy";labelIdentifier="DUPLICATE";onClick(){this.sequenceChild.duplicate({animate:!0})}}class M extends I{icon="bin";labelIdentifier="DELETE";onClick(){this.sequenceChild.delete({animate:!0})}}class U extends EventTarget{constructor(e,t,i,n,s,l,a,r){super(),this.blockDef=e,this.type=e.name,this.prefix=i,this.index=n,this.id=s,this.sequence=a;const c=r&&r.animate,d=r&&r.focus,h=r&&r.collapsed;this.strings=r&&r.strings||{};const u=`block-${s}-section`,p=`block-${s}-heading`,m=`block-${s}-content`,b=(0,o.Z)(this.blockDef.meta.icon),f=(0,o.Z)(this.blockDef.meta.label),k=new g({panelId:u,headingId:p,contentId:m,blockDef:e,blockTypeIcon:b,blockTypeLabel:f}).render(),w=$(`\n <div data-streamfield-child ${this.id?`data-contentpath="${(0,o.Z)(this.id)}"`:"data-contentpath-disabled"}>\n <input type="hidden" name="${this.prefix}-deleted" value="">\n <input type="hidden" name="${this.prefix}-order" value="${n}">\n <input type="hidden" name="${this.prefix}-type" value="${(0,o.Z)(this.type||"")}">\n <input type="hidden" name="${this.prefix}-id" value="${(0,o.Z)(this.id||"")}">\n ${k.outerHTML}\n </div>\n `);$(t).replaceWith(w),this.element=w.get(0);const x=w.find("[data-streamfield-block]").get(0);this.actionsContainerElement=w.find("[data-panel-controls]").get(0),this.titleElement=w.find("[data-panel-heading-text]"),this.toggleElement=this.element.querySelector("[data-panel-toggle]"),this.deletedInput=w.find(`input[name="${this.prefix}-deleted"]`),this.indexInput=w.find(`input[name="${this.prefix}-order"]`),this.addActionButton(new q(this)),this.addActionButton(new L(this)),this.addActionButton(new T(this)),this.addActionButton(new A(this)),this.addActionButton(new M(this));const y=new Map;y.set("duplicate",{enabled:!0,fn:this.duplicate}),y.set("split",{enabled:!0,fn:this.split.bind(this)}),y.set("addSibling",{enabled:!0,fn:this.addSibling.bind(this),blockGroups:this.sequence.getBlockGroups(),getBlockCount:this.sequence.getBlockCount.bind(this.sequence),getBlockMax:this.sequence.getBlockMax.bind(this.sequence)}),this.blockDef instanceof D&&(this.blockDef.collapsible=!1),this.block=this.blockDef.render(x,this.prefix+"-value",l,void 0,y),v(this.element.querySelector("[data-panel-toggle]")),h&&this.collapse(),this.toggleElement.addEventListener("wagtail:panel-toggle",()=>{const e=this.getTextLabel({maxLength:70});this.titleElement.text(e||"")});const C=this.getTextLabel({maxLength:70});this.titleElement.text(C||""),c?(w.hide(),setTimeout(()=>{w.slideDown(),d&&this.block.focus({soft:!0})},10)):d&&this.block.focus({soft:!0})}addActionButton(e){e.render(this.actionsContainerElement)}addSibling(e){this.sequence._onRequestInsert(this.index+1,e)}moveUp(){this.sequence.moveBlockUp(this.index)}moveDown(){this.sequence.moveBlockDown(this.index)}duplicate(e){this.sequence.duplicateBlock(this.index,e)}delete(e){this.sequence.deleteBlock(this.index,e)}markDeleted({animate:e=!1}){this.deletedInput.val("1"),e?$(this.element).slideUp().dequeue().fadeOut().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true");const t=this.getContentPath();t&&window.comments.commentApp&&window.comments.commentApp.invalidateContentPath(t)}getContentPath(){return window.comments?.getContentPath(this.element)}enableDuplication(){this.dispatchEvent(new Event("enableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!0})}disableDuplication(){this.dispatchEvent(new Event("disableDuplication")),this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("duplicate",{enabled:!1})}enableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!0})}disableSplit(){this.block&&this.block.setCapabilityOptions&&this.block.setCapabilityOptions("split",{enabled:!1})}enableMoveUp(){this.dispatchEvent(new Event("enableMoveUp"))}disableMoveUp(){this.dispatchEvent(new Event("disableMoveUp"))}enableMoveDown(){this.dispatchEvent(new Event("enableMoveDown"))}disableMoveDown(){this.dispatchEvent(new Event("disableMoveDown"))}setIndex(e){this.index=e,this.indexInput.val(e)}setError(e){this.block.setError(e),e&&k(this.toggleElement,!0)}focus(e){this.block.focus(e)}getTextLabel(e){return this.block.getTextLabel?this.block.getTextLabel(e):null}collapse(){k(this.toggleElement,!1)}getDuplicatedState(){return{id:B(),value:void 0===this.block.getDuplicatedState?this.block.getState():this.block.getDuplicatedState()}}}class O{constructor(e,t){this.index=t&&t.index,this.onRequestInsert=t&&t.onRequestInsert}setIndex(e){this.index=e}delete({animate:e=!1}){e?$(this.element).slideUp().attr("aria-hidden","true"):$(this.element).hide().attr("aria-hidden","true")}}class P{_createChild(e,t,i,n,s,l,a,o){throw new Error("not implemented")}_createInsertionControl(e,t){throw new Error("not implemented")}_getChildDataForInsertion(e){throw new Error("not implemented")}getBlockGroups(){throw new Error("not implemented")}clear(){this.countInput.val(0),this.sequenceContainer.empty(),this.children=[],this.blockCounter=0;const e=document.createElement("div");this.sequenceContainer.append(e),this.inserters=[this._createInsertionControl(e,{index:0,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings})],this.blockCountChanged()}_onRequestInsert(e,t){const[i,n,s]=this._getChildDataForInsertion(t);this._insert(i,n,s||null,e,{animate:!0,focus:!0})}blockCountChanged(){}_insert(e,t,i,n,s){const l=this.prefix+"-"+this.blockCounter,a=s&&s.animate,o=s&&s.focus,r=s&&s.collapsed;this.blockCounter+=1;const c=this.inserters[n].element,d=document.createElement("div"),h=document.createElement("div");$(d).insertAfter(c),$(h).insertAfter(d),(0,S.y)(n,this.children.length).forEach(e=>{this.children[e].setIndex(e+1)}),(0,S.y)(n+1,this.inserters.length).forEach(e=>{this.inserters[e].setIndex(e+1)});const u=this._createChild(e,d,l,n,i,t,this,{animate:a,focus:o,collapsed:r,strings:this.blockDef.meta.strings});this.children.splice(n,0,u);const p=this._createInsertionControl(h,{index:n+1,onRequestInsert:(e,t)=>{this._onRequestInsert(e,t)},strings:this.blockDef.meta.strings,animate:a});this.inserters.splice(n+1,0,p),this.countInput.val(this.blockCounter);const m=0===n,b=n===this.children.length-1;return m||(u.enableMoveUp(),b&&this.children[n-1].enableMoveDown()),b||(u.enableMoveDown(),m&&this.children[n+1].enableMoveUp()),this.blockCountChanged(),u}deleteBlock(e,t){const i=t&&t.animate;this.children[e].markDeleted({animate:i}),this.inserters[e].delete({animate:i}),this.children.splice(e,1),this.inserters.splice(e,1),(0,S.y)(e,this.children.length).forEach(e=>{this.children[e].setIndex(e)}),(0,S.y)(e,this.inserters.length).forEach(e=>{this.inserters[e].setIndex(e)}),0===e&&this.children.length>0&&this.children[0].disableMoveUp(),e===this.children.length&&this.children.length>0&&this.children[this.children.length-1].disableMoveDown(),this.blockCountChanged()}initDragNDrop(){this.sortable=_.Ay.create(this.sequenceContainer.get(0),{handle:'[data-streamfield-action="DRAG"]',animation:200,draggable:"[data-streamfield-child]",onEnd:e=>{const{oldDraggableIndex:t,newDraggableIndex:i}=e;t!==i&&this.moveBlock(t,i)},setData:e=>{e.setData("application/vnd.wagtail.type","sf-block")}})}moveBlock(e,t){if(e===t)return;const i=this.inserters[e],n=this.children[e];t>e?$(i.element).insertAfter(this.children[t].element):$(i.element).insertBefore(this.inserters[t].element),$(n.element).insertAfter(i.element),this.inserters.splice(e,1),this.inserters.splice(t,0,i),this.children.splice(e,1),this.children.splice(t,0,n),t>e?(0,S.y)(e,t+1).forEach(e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)}):(0,S.y)(t,e+1).forEach(e=>{this.inserters[e].setIndex(e),this.children[e].setIndex(e)});const s=this.children.length-1;0===e&&(n.enableMoveUp(),this.children[0].disableMoveUp()),e===s&&(n.enableMoveDown(),this.children[s].disableMoveDown()),0===t&&(n.disableMoveUp(),this.children[1].enableMoveUp()),t===s&&(n.disableMoveDown(),this.children[s-1].enableMoveDown())}moveBlockUp(e){this.moveBlock(e,e-1)}moveBlockDown(e){this.moveBlock(e,e+1)}setState(e){this.clear(),e.forEach((e,t)=>{this.insert(e,t)})}getState(){return this.children.map(e=>e.getState())}getDuplicatedState(){return this.children.map(e=>e.getDuplicatedState())}getValue(){return this.children.map(e=>e.getValue())}getTextLabel(e){const t=e&&e.maxLength;let i="";for(const e of this.children){const n=e.getTextLabel({maxLength:t});if(n)if(i){const e=i+", "+n;if(t&&e.length>t-1)return i.endsWith("…")||(i+="…"),i;i=e}else i=n}return i}focus(e){this.children.length&&this.children[0].focus(e)}}class R extends U{getState(){return{id:this.id||null,value:this.block.getState()}}getValue(){return this.block.getValue()}setState({value:e,id:t}){this.block.setState(e),this.id=void 0===t?null:t}setValue(e){this.block.setState(e)}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class F extends O{constructor(e,t){super(e,t),this.onRequestInsert=t&&t.onRequestInsert;const i=t&&t.animate,n=(0,o.Z)(t.strings.ADD),s=$(`\n <button type="button" title="${n}" data-streamfield-list-add class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n `);$(e).replaceWith(s),this.element=s.get(0),s.click(()=>{this.onRequestInsert&&this.onRequestInsert(this.index)}),i&&s.hide().slideDown()}enable(){$(this.element).removeAttr("disabled")}disable(){$(this.element).attr("disabled","true")}}class V extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-list-count value="0">\n\n <div data-streamfield-list-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.children=[],this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-list-count]"),this.sequenceContainer=l.find("[data-streamfield-list-container]"),this.container=l,this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach(e=>{e.collapse()}),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}setState(e){this.clear(),e.forEach(({value:e,id:t},i)=>{const n=void 0===t?B():t;this.insert(e,i,{id:t||n})})}_getChildDataForInsertion(){return[this.blockDef.childBlockDef,this.blockDef.initialChildState,B()]}_createChild(e,t,i,n,s,l,a,o){return new R(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return new F(e,t)}blockCountChanged(){super.blockCountChanged();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}e.length?this.setError({messages:e}):this.setError({})}insert(e,t,i){return this._insert(this.blockDef.childBlockDef,e,i?.id,t,i)}duplicateBlock(e,t){const i=this.children[e],{id:n,value:s}=i.getDuplicatedState(),l=t&&t.animate;this.insert(s,e+1,{animate:l,focus:!0,collapsed:i.collapsed,id:n})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate;l.setValue(t);const o=this.insert(i,e+1,{animate:a,focus:!0,collapsed:l.collapsed}),r=l.getContentPath(),c=o.getContentPath(),d=window.comments?.commentApp;r&&c&&d&&d.utils.selectCommentsForContentPathFactory(r)(d.store.getState()).forEach(e=>{n(e)&&d.updateContentPath(e.localId,c)})}setError(e){if(!e)return;const t=this.container[0];(0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors&&Object.entries(e.blockErrors).forEach(([e,t])=>{this.children[e].setError(t)})}getBlockGroups(){return[["",[this.blockDef.childBlockDef]]]}getBlockCount(){return this.children.length}getBlockMax(){return this.blockDef.meta.maxNum||0}}class Z{constructor(e,t,i,n){this.name=e,this.childBlockDef=t,this.initialChildState=i,this.meta=n}render(e,t,i,n){return new V(this,e,t,i,n)}}var N=i(7381),j=i(4549),W=i(2891);const H={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){function t(t){"Escape"===t.key&&e()}return{onShow(){document.addEventListener("keydown",t)},onHide(){document.removeEventListener("keydown",t)}}}};W.Controller;class G extends U{getState(){return{type:this.type,value:this.block.getState(),id:this.id||null}}getDuplicatedState(){return{...super.getDuplicatedState(),type:this.type}}setState({type:e,value:t,id:i}){this.type=e,this.block.setState(t),this.id=void 0===i?null:i}getValue(){return{type:this.type,value:this.block.getValue(),id:this.id||null}}split(e,t,i,n){this.sequence.splitBlock(this.index,e,t,i,n)}}class z extends O{constructor(e,t){super(e,t),this.groupedChildBlockDefs=t.groupedChildBlockDefs;const i=$(`\n <div>\n <button type="button" title="${j.Mn}" class="c-sf-add-button">\n <svg class="icon icon-plus" aria-hidden="true"><use href="#icon-plus"></use></svg>\n </button>\n </div>\n `);$(e).replaceWith(i),this.element=i.get(0),this.addButton=i.find("button");const n=this.blockItems;1!==n.length||1!==n[0].items.length?(this.combobox=document.createElement("div"),this.tooltip=(0,N.Ay)(this.addButton.get(0),{content:this.combobox,trigger:"click",interactive:!0,maxWidth:"none",theme:"dropdown",arrow:!1,placement:"bottom",plugins:[H],onShow:this.renderMenu.bind(this),onHidden:()=>{s().render(null,this.combobox)}})):this.addButton.click(()=>{this.onRequestInsert&&this.onRequestInsert(this.index,n[0].items[0])})}get blockItems(){return this.groupedChildBlockDefs.map(([e,t])=>({label:e||"",type:e||"",items:t.map(e=>({type:e.name,label:e.meta.label,description:e.meta.description,icon:e.meta.icon,blockDefId:e.meta.blockDefId,isPreviewable:e.meta.isPreviewable}))}))}renderMenu(){const e=this.blockItems;s().render(a().createElement(j.Ay,{label:j.qc,placeholder:j.qc,items:e,getItemLabel:(e,t)=>t.label,getItemDescription:e=>e.label,getSearchFields:e=>[e.label,e.type],noResultsText:j.b5,onSelect:this.onSelectBlock.bind(this)}),this.combobox)}onSelectBlock(e){this.onRequestInsert&&this.onRequestInsert(this.index,{type:e.selectedItem.type}),this.close()}open(){this.addButton.attr("aria-expanded","true"),this.tooltip.show()}close(){this.addButton.attr("aria-expanded","false"),this.tooltip.hide()}}class X extends P{constructor(e,t,i,n,s){super(),this.blockDef=e,this.type=e.name,this.prefix=i;const l=$(`\n <div class="${(0,o.Z)(this.blockDef.meta.classname||"")}">\n <input type="hidden" name="${(0,o.Z)(i)}-count" data-streamfield-stream-count value="0">\n <div data-streamfield-stream-container></div>\n </div>\n `);$(t).replaceWith(l),this.blockDef.meta.helpText&&$(`\n <div class="c-sf-help">\n <div class="help">\n ${this.blockDef.meta.helpText}\n </div>\n </div>\n `).insertBefore(l),this.container=l,this.element=l.get(0),this.children=[],this.childBlockCounts=new Map,this.inserters=[],this.blockCounter=0,this.countInput=l.find("[data-streamfield-stream-count]"),this.sequenceContainer=l.find("[data-streamfield-stream-container]"),this.setState(n||[]),this.blockDef.meta.collapsed&&this.children.forEach(e=>{e.collapse()}),s&&this.setError(s),this.initDragNDrop(),(0,c.$)(this.container[0],this.blockDef.meta.attrs||{})}getBlockGroups(){return this.blockDef.groupedChildBlockDefs}getBlockCount(e){return e?(this.childBlockCounts.has(e)||this._updateBlockCount(e),this.childBlockCounts.get(e)||0):this.children.length}getBlockMax(e){return e?this.blockDef.meta.blockCounts[e]?.max_num:this.blockDef.meta.maxNum}_updateBlockCount(e){const t=this.children.filter(t=>t.type===e).length;this.childBlockCounts.set(e,t)}blockCountChanged(){super.blockCountChanged(),this.childBlockCounts.clear();const e=[],t=this.blockDef.meta.maxNum;if("number"==typeof t&&this.children.length>t){const i=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${t}`);e.push(i)}const i=this.blockDef.meta.minNum;if("number"==typeof i&&this.children.length<i){const t=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${i}`);e.push(t)}for(const[t,i]of Object.entries(this.blockDef.meta.blockCounts)){const n=i.max_num;if("number"==typeof n&&this.getBlockCount(t)>n){const i=this.blockDef.childBlockDefsByName[t],s=(0,f.AP)("The maximum number of items is %(max_num)d").replace("%(max_num)d",`${n}`),l=`${i.meta.label}: ${s}`;e.push(l)}const s=i.min_num;if("number"==typeof s&&this.getBlockCount(t)<s){const i=this.blockDef.childBlockDefsByName[t],n=(0,f.AP)("The minimum number of items is %(min_num)d").replace("%(min_num)d",`${s}`),l=`${i.meta.label}: ${n}`;e.push(l)}}e.length?this.setError({messages:e}):this.setError({})}_createChild(e,t,i,n,s,l,a,o){return new G(e,t,i,n,s,l,a,o)}_createInsertionControl(e,t){return t.groupedChildBlockDefs=this.blockDef.groupedChildBlockDefs,new z(e,t)}insert({type:e,value:t,id:i},n,s){const l=this.blockDef.childBlockDefsByName[e];return this._insert(l,t,i,n,s)}_getChildDataForInsertion({type:e}){return[this.blockDef.childBlockDefsByName[e],this.blockDef.initialChildStates[e],B()]}duplicateBlock(e,t){const i=this.children[e],n=i.getDuplicatedState(),s=t&&t.animate;this.insert(n,e+1,{animate:s,focus:!0,collapsed:i.collapsed})}splitBlock(e,t,i,n,s){const l=this.children[e],a=s&&s.animate,o=l.getState(),r=this.insert({type:o.type,id:B(),value:i},e+1,{animate:a,focus:!0,collapsed:l.collapsed});l.setState({type:o.type,id:o.id||null,value:t});const c=l.getContentPath(),d=r.getContentPath(),h=window.comments?.commentApp;c&&d&&h&&h.utils.selectCommentsForContentPathFactory(c)(h.store.getState()).forEach(e=>{n(e)&&h.updateContentPath(e.localId,d)})}setState(e){super.setState(e)}setError(e){if(!e)return;const t=this.container[0];if((0,b.$)(t),e.messages&&(0,b.U)(t,e.messages),e.blockErrors)for(const t in e.blockErrors)(0,m.$)(e.blockErrors,t)&&this.children[t].setError(e.blockErrors[t])}}class J{constructor(e,t,i,n){this.name=e,this.groupedChildBlockDefs=t,this.initialChildStates=i,this.childBlockDefsByName={},this.groupedChildBlockDefs.forEach(([e,t])=>{t.forEach(e=>{this.childBlockDefsByName[e.name]=e})}),this.meta=n}render(e,t,i,n){return new X(this,e,t,i,n)}}const K=window.wagtailStreamField||{};K.blocks={FieldBlock:d,FieldBlockDefinition:h,StaticBlock:u,StaticBlockDefinition:p,StructBlock:w,StructBlockDefinition:D,ListBlock:V,ListBlockDefinition:Z,StreamBlock:X,StreamBlockDefinition:J},window.telepath.register("wagtail.blocks.FieldBlock",h),window.telepath.register("wagtail.blocks.StaticBlock",p),window.telepath.register("wagtail.blocks.StructBlock",D),window.telepath.register("wagtail.blocks.ListBlock",Z),window.telepath.register("wagtail.blocks.StreamBlock",J),window.wagtailStreamField=K}},i={};function n(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,i,s,l)=>{if(!i){var a=1/0;for(d=0;d<e.length;d++){for(var[i,s,l]=e[d],o=!0,r=0;r<i.length;r++)(!1&l||a>=l)&&Object.keys(n.O).every(e=>n.O[e](i[r]))?i.splice(r--,1):(o=!1,l<a&&(a=l));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[i,s,l]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=591,(()=>{var e={591:0};n.O.j=t=>0===e[t];var t=(t,i)=>{var s,l,[a,o,r]=i,c=0;if(a.some(t=>0!==e[t])){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(r)var d=r(n)}for(t&&t(i);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},i=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var s=n.O(void 0,[321],()=>n(2294));s=n.O(s)})();
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
type="button"
|
|
33
33
|
class="button button-small button-secondary w-hidden w-ml-2.5"
|
|
34
34
|
data-controller="w-count w-focus"
|
|
35
|
-
data-action="click->w-focus#focus"
|
|
35
|
+
data-action="click->w-focus#focus wagtail:panel-init@document->w-count#count"
|
|
36
36
|
data-w-count-active-class="!w-inline-block"
|
|
37
37
|
data-w-count-find-value=":not([hidden]):is(.error-message,.help-critical)"
|
|
38
38
|
data-w-focus-target-value=":not([hidden]):is(.error-message,.help-critical)"
|
|
@@ -213,11 +213,23 @@ def build_absolute_url(context, url):
|
|
|
213
213
|
Returns the absolute URL of the given URL based on the request's host.
|
|
214
214
|
If the request doesn't exist in the context, falls back to
|
|
215
215
|
WAGTAILADMIN_BASE_URL as the base URL.
|
|
216
|
-
If the given URL is already absolute,
|
|
216
|
+
If the given URL is already absolute, or the request is a dummy preview
|
|
217
|
+
request, returns it unchanged.
|
|
217
218
|
"""
|
|
218
219
|
request = context.get("request")
|
|
220
|
+
# If request is not found in the context, e.g. in notification emails,
|
|
221
|
+
# fall back to WAGTAILADMIN_BASE_URL.
|
|
219
222
|
if not request:
|
|
220
223
|
return urljoin(get_admin_base_url(), url)
|
|
224
|
+
# With a dummy preview request, the host has been overwritten to be the page
|
|
225
|
+
# Site's host, which may not have been configured correctly. We don't want
|
|
226
|
+
# to fall back to WAGTAILADMIN_BASE_URL either, as that may be different
|
|
227
|
+
# from the original request's host in multi-site instances and may result in
|
|
228
|
+
# users having to log in again. So we just return the URL unchanged.
|
|
229
|
+
if getattr(request, "is_dummy", False):
|
|
230
|
+
return url
|
|
231
|
+
# Rewrite relative URLs to absolute URLs based on the request's host, but
|
|
232
|
+
# leave absolute URLs unchanged.
|
|
221
233
|
return request.build_absolute_uri(url)
|
|
222
234
|
|
|
223
235
|
|
|
@@ -558,6 +558,10 @@ class TestPageCreation(WagtailTestUtils, TestCase):
|
|
|
558
558
|
buttons = message.find_all("button")
|
|
559
559
|
self.assertEqual(len(buttons), 1)
|
|
560
560
|
self.assertEqual(buttons[0].attrs["data-controller"], "w-count w-focus")
|
|
561
|
+
self.assertEqual(
|
|
562
|
+
set(buttons[0].attrs["data-action"].split()),
|
|
563
|
+
{"click->w-focus#focus", "wagtail:panel-init@document->w-count#count"},
|
|
564
|
+
)
|
|
561
565
|
self.assertIn("Go to the first error", buttons[0].get_text())
|
|
562
566
|
|
|
563
567
|
# Check that a form error was raised
|
|
@@ -790,6 +794,10 @@ class TestPageCreation(WagtailTestUtils, TestCase):
|
|
|
790
794
|
buttons = message.find_all("button")
|
|
791
795
|
self.assertEqual(len(buttons), 1)
|
|
792
796
|
self.assertEqual(buttons[0].attrs["data-controller"], "w-count w-focus")
|
|
797
|
+
self.assertEqual(
|
|
798
|
+
set(buttons[0].attrs["data-action"].split()),
|
|
799
|
+
{"click->w-focus#focus", "wagtail:panel-init@document->w-count#count"},
|
|
800
|
+
)
|
|
793
801
|
self.assertIn("Go to the first error", buttons[0].get_text())
|
|
794
802
|
|
|
795
803
|
# Check that a form error was raised
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
from functools import wraps
|
|
3
3
|
|
|
4
|
+
from django.contrib.auth.models import Permission
|
|
4
5
|
from django.test import TestCase, override_settings
|
|
5
6
|
from django.urls import reverse
|
|
6
7
|
from django.utils import timezone
|
|
@@ -358,6 +359,47 @@ class TestPreview(WagtailTestUtils, TestCase):
|
|
|
358
359
|
self.assertTemplateUsed(response, "tests/event_page.html")
|
|
359
360
|
self.assertContains(response, "Placeholder title")
|
|
360
361
|
|
|
362
|
+
def test_preview_on_create_without_permissions(self):
|
|
363
|
+
# Remove privileges from user
|
|
364
|
+
self.user.is_superuser = False
|
|
365
|
+
self.user.user_permissions.add(
|
|
366
|
+
Permission.objects.get(
|
|
367
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
368
|
+
)
|
|
369
|
+
)
|
|
370
|
+
self.user.save()
|
|
371
|
+
|
|
372
|
+
preview_url = reverse(
|
|
373
|
+
"wagtailadmin_pages:preview_on_add",
|
|
374
|
+
args=("tests", "eventpage", self.home_page.id),
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
response = self.client.post(
|
|
378
|
+
preview_url,
|
|
379
|
+
self.post_data,
|
|
380
|
+
)
|
|
381
|
+
self.assertEqual(response.status_code, 302)
|
|
382
|
+
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
383
|
+
|
|
384
|
+
def test_preview_on_create_get_without_permissions(self):
|
|
385
|
+
# Remove privileges from user
|
|
386
|
+
self.user.is_superuser = False
|
|
387
|
+
self.user.user_permissions.add(
|
|
388
|
+
Permission.objects.get(
|
|
389
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
390
|
+
)
|
|
391
|
+
)
|
|
392
|
+
self.user.save()
|
|
393
|
+
|
|
394
|
+
preview_url = reverse(
|
|
395
|
+
"wagtailadmin_pages:preview_on_add",
|
|
396
|
+
args=("tests", "eventpage", self.home_page.id),
|
|
397
|
+
)
|
|
398
|
+
|
|
399
|
+
response = self.client.get(preview_url)
|
|
400
|
+
self.assertEqual(response.status_code, 302)
|
|
401
|
+
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
402
|
+
|
|
361
403
|
def test_preview_on_edit_with_m2m_field(self):
|
|
362
404
|
preview_url = reverse(
|
|
363
405
|
"wagtailadmin_pages:preview_on_edit", args=(self.event_page.id,)
|
|
@@ -414,6 +456,36 @@ class TestPreview(WagtailTestUtils, TestCase):
|
|
|
414
456
|
self.assertContains(response, "<li>Parties</li>")
|
|
415
457
|
self.assertContains(response, "<li>Holidays</li>")
|
|
416
458
|
|
|
459
|
+
soup = self.get_soup(response.content)
|
|
460
|
+
userbar = soup.select_one("wagtail-userbar")
|
|
461
|
+
self.assertIsNotNone(userbar)
|
|
462
|
+
template = soup.select_one("#wagtail-userbar-template")
|
|
463
|
+
self.assertIsNotNone(template)
|
|
464
|
+
|
|
465
|
+
# Previews use a dummy request object, so the userbar should use
|
|
466
|
+
# relative URLs to avoid using the wrong host.
|
|
467
|
+
admin_url = reverse("wagtailadmin_home")
|
|
468
|
+
admin_link = template.select_one(f'a[href$="{admin_url}"]')
|
|
469
|
+
self.assertIsNotNone(admin_link)
|
|
470
|
+
self.assertEqual(admin_link["href"], admin_url)
|
|
471
|
+
|
|
472
|
+
css_links = soup.select("link[rel='stylesheet']")
|
|
473
|
+
self.assertEqual(
|
|
474
|
+
[link.get("href") for link in css_links],
|
|
475
|
+
[
|
|
476
|
+
versioned_static("wagtailadmin/css/core.css"),
|
|
477
|
+
"/path/to/my/custom.css",
|
|
478
|
+
],
|
|
479
|
+
)
|
|
480
|
+
scripts = soup.select("script[src]")
|
|
481
|
+
self.assertEqual(
|
|
482
|
+
[script.get("src") for script in scripts],
|
|
483
|
+
[
|
|
484
|
+
versioned_static("wagtailadmin/js/vendor.js"),
|
|
485
|
+
versioned_static("wagtailadmin/js/userbar.js"),
|
|
486
|
+
],
|
|
487
|
+
)
|
|
488
|
+
|
|
417
489
|
def test_preview_on_edit_with_valid_then_invalid_data(self):
|
|
418
490
|
preview_url = reverse(
|
|
419
491
|
"wagtailadmin_pages:preview_on_edit", args=(self.event_page.id,)
|
|
@@ -557,6 +629,45 @@ class TestPreview(WagtailTestUtils, TestCase):
|
|
|
557
629
|
response = self.client.get(preview_url)
|
|
558
630
|
self.assertEqual(response.status_code, 200)
|
|
559
631
|
|
|
632
|
+
def test_preview_on_edit_without_permissions(self):
|
|
633
|
+
# Remove privileges from user
|
|
634
|
+
self.user.is_superuser = False
|
|
635
|
+
self.user.user_permissions.add(
|
|
636
|
+
Permission.objects.get(
|
|
637
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
638
|
+
)
|
|
639
|
+
)
|
|
640
|
+
self.user.save()
|
|
641
|
+
|
|
642
|
+
preview_url = reverse(
|
|
643
|
+
"wagtailadmin_pages:preview_on_edit", args=(self.event_page.id,)
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
response = self.client.post(
|
|
647
|
+
preview_url,
|
|
648
|
+
self.post_data,
|
|
649
|
+
)
|
|
650
|
+
self.assertEqual(response.status_code, 302)
|
|
651
|
+
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
652
|
+
|
|
653
|
+
def test_preview_on_edit_get_without_permissions(self):
|
|
654
|
+
# Remove privileges from user
|
|
655
|
+
self.user.is_superuser = False
|
|
656
|
+
self.user.user_permissions.add(
|
|
657
|
+
Permission.objects.get(
|
|
658
|
+
content_type__app_label="wagtailadmin", codename="access_admin"
|
|
659
|
+
)
|
|
660
|
+
)
|
|
661
|
+
self.user.save()
|
|
662
|
+
|
|
663
|
+
preview_url = reverse(
|
|
664
|
+
"wagtailadmin_pages:preview_on_edit", args=(self.event_page.id,)
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
response = self.client.get(preview_url)
|
|
668
|
+
self.assertEqual(response.status_code, 302)
|
|
669
|
+
self.assertRedirects(response, reverse("wagtailadmin_home"))
|
|
670
|
+
|
|
560
671
|
def test_preview_on_create_clear_preview_data(self):
|
|
561
672
|
preview_session_key = "wagtail-preview-tests-eventpage-{}".format(
|
|
562
673
|
self.home_page.id
|
|
@@ -17,13 +17,16 @@ from wagtail.blocks.base import Block
|
|
|
17
17
|
from wagtail.models import PreviewableMixin, RevisionMixin
|
|
18
18
|
from wagtail.utils.decorators import xframe_options_sameorigin_override
|
|
19
19
|
|
|
20
|
+
from .permissions import PermissionCheckedMixin
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
|
|
23
|
+
class PreviewOnEdit(PermissionCheckedMixin, View):
|
|
22
24
|
model = None
|
|
23
25
|
form_class = None
|
|
24
26
|
http_method_names = ("post", "get", "delete")
|
|
25
27
|
preview_expiration_timeout = 60 * 60 * 24 # seconds
|
|
26
28
|
session_key_prefix = "wagtail-preview-"
|
|
29
|
+
permission_required = "change"
|
|
27
30
|
|
|
28
31
|
def setup(self, request, *args, **kwargs):
|
|
29
32
|
super().setup(request, *args, **kwargs)
|
|
@@ -54,6 +57,8 @@ class PreviewOnEdit(View):
|
|
|
54
57
|
|
|
55
58
|
def get_object(self):
|
|
56
59
|
obj = get_object_or_404(self.model, pk=unquote(str(self.kwargs["pk"])))
|
|
60
|
+
if not self.user_has_permission_for_instance(self.permission_required, obj):
|
|
61
|
+
raise PermissionDenied
|
|
57
62
|
if isinstance(obj, RevisionMixin):
|
|
58
63
|
obj = obj.get_latest_revision_as_object()
|
|
59
64
|
return obj
|
|
@@ -136,6 +141,8 @@ class PreviewOnEdit(View):
|
|
|
136
141
|
|
|
137
142
|
|
|
138
143
|
class PreviewOnCreate(PreviewOnEdit):
|
|
144
|
+
permission_required = "add"
|
|
145
|
+
|
|
139
146
|
@property
|
|
140
147
|
def session_key(self):
|
|
141
148
|
app_label = self.model._meta.app_label
|
|
@@ -30,9 +30,13 @@ class PreviewOnEdit(GenericPreviewOnEdit):
|
|
|
30
30
|
return "{}{}".format(self.session_key_prefix, self.kwargs["page_id"])
|
|
31
31
|
|
|
32
32
|
def get_object(self):
|
|
33
|
-
|
|
33
|
+
page = get_object_or_404(
|
|
34
34
|
Page, id=self.kwargs["page_id"]
|
|
35
35
|
).get_latest_revision_as_object()
|
|
36
|
+
page_perms = page.permissions_for_user(self.request.user)
|
|
37
|
+
if not page_perms.can_edit():
|
|
38
|
+
raise PermissionDenied
|
|
39
|
+
return page
|
|
36
40
|
|
|
37
41
|
def get_form(self, query_dict):
|
|
38
42
|
form_class = self.object.get_edit_handler().get_form_class()
|
|
@@ -87,6 +91,11 @@ class PreviewOnCreate(PreviewOnEdit):
|
|
|
87
91
|
|
|
88
92
|
page = content_type.model_class()()
|
|
89
93
|
parent_page = get_object_or_404(Page, id=parent_page_id).specific
|
|
94
|
+
|
|
95
|
+
parent_page_perms = parent_page.permissions_for_user(self.request.user)
|
|
96
|
+
if not parent_page_perms.can_add_subpage():
|
|
97
|
+
raise PermissionDenied
|
|
98
|
+
|
|
90
99
|
# We need to populate treebeard's path / depth fields in order to
|
|
91
100
|
# pass validation. We can't make these 100% consistent with the rest
|
|
92
101
|
# of the tree without making actual database changes (such as
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Afrikaans (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -13,7 +13,7 @@ msgid ""
|
|
|
13
13
|
msgstr ""
|
|
14
14
|
"Project-Id-Version: Wagtail\n"
|
|
15
15
|
"Report-Msgid-Bugs-To: \n"
|
|
16
|
-
"POT-Creation-Date: 2025-
|
|
16
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
17
17
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
18
18
|
"Last-Translator: Abdullah Bamuhrez <bamuhrez@gmail.com>, 2025\n"
|
|
19
19
|
"Language-Team: Arabic (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Azerbaijani (Azerbaijan) (http://app.transifex.com/torchbox/"
|
|
@@ -8,7 +8,7 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: Wagtail\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2025-
|
|
11
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
12
12
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
13
13
|
"Last-Translator: Tatsiana Tsygan <art.tatsiana@gmail.com>, 2020\n"
|
|
14
14
|
"Language-Team: Belarusian (http://app.transifex.com/torchbox/wagtail/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Bulgarian (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Bengali (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -8,7 +8,7 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: Wagtail\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: \n"
|
|
11
|
-
"POT-Creation-Date: 2025-
|
|
11
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
12
12
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
13
13
|
"Last-Translator: Roger Pons <rogerpons@gmail.com>, 2016-2017,2020,2023,2025\n"
|
|
14
14
|
"Language-Team: Catalan (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -13,7 +13,7 @@ msgid ""
|
|
|
13
13
|
msgstr ""
|
|
14
14
|
"Project-Id-Version: Wagtail\n"
|
|
15
15
|
"Report-Msgid-Bugs-To: \n"
|
|
16
|
-
"POT-Creation-Date: 2025-
|
|
16
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
17
17
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
18
18
|
"Last-Translator: Mirek Zvolský <zvolsky@seznam.cz>, 2020\n"
|
|
19
19
|
"Language-Team: Czech (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -12,7 +12,7 @@ msgid ""
|
|
|
12
12
|
msgstr ""
|
|
13
13
|
"Project-Id-Version: Wagtail\n"
|
|
14
14
|
"Report-Msgid-Bugs-To: \n"
|
|
15
|
-
"POT-Creation-Date: 2025-
|
|
15
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
16
16
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
17
17
|
"Last-Translator: Philip Lindsay-Crisp, 2024\n"
|
|
18
18
|
"Language-Team: Welsh (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Danish (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -24,7 +24,7 @@ msgid ""
|
|
|
24
24
|
msgstr ""
|
|
25
25
|
"Project-Id-Version: Wagtail\n"
|
|
26
26
|
"Report-Msgid-Bugs-To: \n"
|
|
27
|
-
"POT-Creation-Date: 2025-
|
|
27
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
28
28
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
29
29
|
"Last-Translator: Stefan Hammer <stefan@hammerworxx.com>, 2022,2025\n"
|
|
30
30
|
"Language-Team: German (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
|
9
9
|
msgstr ""
|
|
10
10
|
"Project-Id-Version: Wagtail\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
|
12
|
-
"POT-Creation-Date: 2025-
|
|
12
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
13
13
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
14
14
|
"Last-Translator: Fauzaan Gasim, 2024\n"
|
|
15
15
|
"Language-Team: Divehi (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -15,7 +15,7 @@ msgid ""
|
|
|
15
15
|
msgstr ""
|
|
16
16
|
"Project-Id-Version: Wagtail\n"
|
|
17
17
|
"Report-Msgid-Bugs-To: \n"
|
|
18
|
-
"POT-Creation-Date: 2025-
|
|
18
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
19
19
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
20
20
|
"Last-Translator: 79353a696ad19dc202b261b3067b7640_bec941e, 2015\n"
|
|
21
21
|
"Language-Team: Greek (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -22,7 +22,7 @@ msgid ""
|
|
|
22
22
|
msgstr ""
|
|
23
23
|
"Project-Id-Version: Wagtail\n"
|
|
24
24
|
"Report-Msgid-Bugs-To: \n"
|
|
25
|
-
"POT-Creation-Date: 2025-
|
|
25
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
26
26
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
27
27
|
"Last-Translator: X Bello <xbello@gmail.com>, 2022\n"
|
|
28
28
|
"Language-Team: Spanish (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Spanish (Latin America) (http://app.transifex.com/torchbox/"
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
|
9
9
|
msgstr ""
|
|
10
10
|
"Project-Id-Version: Wagtail\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
|
12
|
-
"POT-Creation-Date: 2025-
|
|
12
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
13
13
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
14
14
|
"Last-Translator: Erlend Eelmets <debcf78e@opayq.com>, 2020\n"
|
|
15
15
|
"Language-Team: Estonian (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: Wagtail\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
11
11
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language-Team: Basque (http://app.transifex.com/torchbox/wagtail/language/"
|
|
@@ -9,7 +9,7 @@ msgid ""
|
|
|
9
9
|
msgstr ""
|
|
10
10
|
"Project-Id-Version: Wagtail\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: \n"
|
|
12
|
-
"POT-Creation-Date: 2025-
|
|
12
|
+
"POT-Creation-Date: 2025-10-23 16:45+0100\n"
|
|
13
13
|
"PO-Revision-Date: 2014-09-11 15:42+0000\n"
|
|
14
14
|
"Last-Translator: pyzenberg <pyzenberg@gmail.com>, 2017\n"
|
|
15
15
|
"Language-Team: Persian (http://app.transifex.com/torchbox/wagtail/language/"
|