wagtail 6.2.2__py3-none-any.whl → 6.3rc2__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.
Files changed (386) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/actions/copy_for_translation.py +6 -0
  3. wagtail/actions/publish_revision.py +3 -3
  4. wagtail/admin/action_menu.py +5 -3
  5. wagtail/admin/forms/account.py +1 -1
  6. wagtail/admin/icons.py +2 -6
  7. wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
  8. wagtail/admin/locale/cy/LC_MESSAGES/django.po +32 -0
  9. wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
  10. wagtail/admin/locale/dv/LC_MESSAGES/django.po +28 -0
  11. wagtail/admin/locale/en/LC_MESSAGES/django.po +451 -485
  12. wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +7 -7
  13. wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
  14. wagtail/admin/locale/sl/LC_MESSAGES/django.po +150 -0
  15. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.mo +0 -0
  16. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.po +9 -2
  17. wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
  18. wagtail/admin/locale/ug/LC_MESSAGES/django.po +3250 -196
  19. wagtail/admin/localization.py +12 -2
  20. wagtail/admin/panels/model_utils.py +1 -1
  21. wagtail/admin/site_summary.py +0 -2
  22. wagtail/admin/static/wagtailadmin/css/core.css +1 -1
  23. wagtail/admin/static/wagtailadmin/css/panels/draftail.css +1 -1
  24. wagtail/admin/static/wagtailadmin/images/email-header.jpg +0 -0
  25. wagtail/admin/static/wagtailadmin/js/bulk-actions.js +1 -1
  26. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  27. wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +12 -0
  28. wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
  29. wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
  30. wagtail/admin/static/wagtailadmin/js/telepath/telepath.js +1 -1
  31. wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
  32. wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
  33. wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +1 -1
  34. wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
  35. wagtail/admin/static/wagtailadmin/js/wagtailadmin.js +1 -1
  36. wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
  37. wagtail/admin/staticfiles.py +6 -4
  38. wagtail/admin/templates/wagtailadmin/account/account.html +42 -59
  39. wagtail/admin/templates/wagtailadmin/admin_base.html +0 -28
  40. wagtail/admin/templates/wagtailadmin/bulk_actions/footer.html +1 -1
  41. wagtail/admin/templates/wagtailadmin/chooser/_search_results.html +7 -5
  42. wagtail/admin/templates/wagtailadmin/chooser/tables/page_navigate_to_children_cell.html +1 -1
  43. wagtail/admin/templates/wagtailadmin/generic/chooser/results.html +7 -5
  44. wagtail/admin/templates/wagtailadmin/generic/edit.html +0 -8
  45. wagtail/admin/templates/wagtailadmin/generic/form.html +60 -17
  46. wagtail/admin/templates/wagtailadmin/generic/index.html +17 -0
  47. wagtail/admin/templates/wagtailadmin/generic/index_results.html +9 -35
  48. wagtail/admin/templates/wagtailadmin/generic/inspect.html +2 -21
  49. wagtail/admin/templates/wagtailadmin/generic/listing.html +11 -17
  50. wagtail/admin/templates/wagtailadmin/generic/listing_results.html +19 -1
  51. wagtail/admin/templates/wagtailadmin/home/account_summary.html +26 -0
  52. wagtail/admin/templates/wagtailadmin/home/locked_pages.html +28 -18
  53. wagtail/admin/templates/wagtailadmin/home/recent_edits.html +28 -17
  54. wagtail/admin/templates/wagtailadmin/home/site_summary_pages.html +2 -2
  55. wagtail/admin/templates/wagtailadmin/home/upgrade_notification.html +35 -13
  56. wagtail/admin/templates/wagtailadmin/home/user_objects_in_workflow_moderation.html +28 -18
  57. wagtail/admin/templates/wagtailadmin/home/workflow_objects_to_moderate.html +43 -32
  58. wagtail/admin/templates/wagtailadmin/home.html +22 -5
  59. wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -1
  60. wagtail/admin/templates/wagtailadmin/pages/action_menu/menu.html +1 -11
  61. wagtail/admin/templates/wagtailadmin/pages/action_menu/menu_item.html +1 -6
  62. wagtail/admin/templates/wagtailadmin/pages/action_menu/page_locked.html +1 -1
  63. wagtail/admin/templates/wagtailadmin/pages/action_menu/publish.html +1 -1
  64. wagtail/admin/templates/wagtailadmin/pages/action_menu/save_draft.html +1 -1
  65. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_delete.html +12 -6
  66. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_move.html +12 -7
  67. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_publish.html +17 -11
  68. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_unpublish.html +15 -9
  69. wagtail/admin/templates/wagtailadmin/pages/confirm_delete.html +9 -9
  70. wagtail/admin/templates/wagtailadmin/pages/confirm_move.html +2 -2
  71. wagtail/admin/templates/wagtailadmin/pages/confirm_unpublish.html +4 -4
  72. wagtail/admin/templates/wagtailadmin/pages/create.html +15 -34
  73. wagtail/admin/templates/wagtailadmin/pages/edit.html +15 -30
  74. wagtail/admin/templates/wagtailadmin/pages/explorable_index.html +6 -0
  75. wagtail/admin/templates/wagtailadmin/pages/explorable_index_results.html +60 -0
  76. wagtail/admin/templates/wagtailadmin/pages/index.html +1 -36
  77. wagtail/admin/templates/wagtailadmin/pages/index_results.html +2 -50
  78. wagtail/admin/templates/wagtailadmin/pages/listing/_locked_indicator.html +1 -1
  79. wagtail/admin/templates/wagtailadmin/pages/listing/_ordering_cell.html +1 -1
  80. wagtail/admin/templates/wagtailadmin/pages/listing/_page_header_buttons.html +1 -1
  81. wagtail/admin/templates/wagtailadmin/pages/listing/_page_title_column_header.html +3 -3
  82. wagtail/admin/templates/wagtailadmin/pages/listing/_pagination.html +1 -1
  83. wagtail/admin/templates/wagtailadmin/pages/listing.html +24 -0
  84. wagtail/admin/templates/wagtailadmin/pages/search.html +1 -20
  85. wagtail/admin/templates/wagtailadmin/pages/search_results.html +27 -25
  86. wagtail/admin/templates/wagtailadmin/permissions/includes/collection_member_permissions_formset.html +0 -1
  87. wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_report.html +2 -2
  88. wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_types_usage.html +6 -6
  89. wagtail/admin/templates/wagtailadmin/reports/workflow_tasks_results.html +1 -1
  90. wagtail/admin/templates/wagtailadmin/shared/action_menu/menu.html +14 -0
  91. wagtail/admin/templates/wagtailadmin/shared/action_menu/menu_item.html +6 -0
  92. wagtail/admin/templates/wagtailadmin/shared/avatar.html +13 -3
  93. wagtail/admin/templates/wagtailadmin/shared/header.html +0 -5
  94. wagtail/admin/templates/wagtailadmin/shared/headers/slim_header.html +1 -1
  95. wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +4 -1
  96. wagtail/admin/templates/wagtailadmin/shared/pagination_nav.html +1 -1
  97. wagtail/admin/templates/wagtailadmin/shared/side_panel_toggle.html +1 -1
  98. wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/locale.html +1 -1
  99. wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/usage.html +2 -2
  100. wagtail/admin/templates/wagtailadmin/shared/side_panels/preview.html +94 -52
  101. wagtail/admin/templates/wagtailadmin/{pages/_unsaved_changes_warning.html → shared/unsaved_changes_warning.html} +4 -4
  102. wagtail/admin/templates/wagtailadmin/shared/usage_summary.html +2 -2
  103. wagtail/admin/templates/wagtailadmin/shared/workflow_history/detail.html +1 -7
  104. wagtail/admin/templates/wagtailadmin/shared/workflow_history/listing.html +1 -0
  105. wagtail/admin/templates/wagtailadmin/shared/workflow_history/{list.html → listing_results.html} +33 -35
  106. wagtail/admin/templates/wagtailadmin/tables/references_cell.html +1 -1
  107. wagtail/admin/templates/wagtailadmin/workflows/create.html +11 -36
  108. wagtail/admin/templates/wagtailadmin/workflows/create_task.html +0 -38
  109. wagtail/admin/templates/wagtailadmin/workflows/edit.html +44 -74
  110. wagtail/admin/templates/wagtailadmin/workflows/edit_task.html +27 -66
  111. wagtail/admin/templates/wagtailadmin/workflows/includes/task_usage_cell.html +4 -2
  112. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_tasks_cell.html +4 -4
  113. wagtail/admin/templates/wagtailadmin/workflows/includes/workflow_used_by_cell.html +15 -11
  114. wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/results.html +7 -5
  115. wagtail/admin/templatetags/wagtailadmin_tags.py +51 -22
  116. wagtail/admin/tests/pages/test_content_type_use_view.py +82 -2
  117. wagtail/admin/tests/pages/test_edit_page.py +70 -0
  118. wagtail/admin/tests/pages/test_explorer_view.py +65 -4
  119. wagtail/admin/tests/pages/test_page_search.py +8 -7
  120. wagtail/admin/tests/pages/test_page_usage.py +3 -1
  121. wagtail/admin/tests/pages/test_preview.py +208 -63
  122. wagtail/admin/tests/pages/test_reorder_page.py +91 -1
  123. wagtail/admin/tests/pages/test_view_draft.py +32 -1
  124. wagtail/admin/tests/pages/test_workflow_history.py +288 -7
  125. wagtail/admin/tests/test_account_management.py +23 -3
  126. wagtail/admin/tests/test_audit_log.py +24 -2
  127. wagtail/admin/tests/test_collections_views.py +17 -5
  128. wagtail/admin/tests/test_dashboard.py +1 -1
  129. wagtail/admin/tests/test_edit_handlers.py +3 -2
  130. wagtail/admin/tests/test_icon_sprite.py +4 -0
  131. wagtail/admin/tests/test_privacy.py +5 -19
  132. wagtail/admin/tests/test_reports_views.py +1 -1
  133. wagtail/admin/tests/test_site_summary.py +3 -3
  134. wagtail/admin/tests/test_templatetags.py +27 -3
  135. wagtail/admin/tests/test_upgrade_notification.py +71 -18
  136. wagtail/admin/tests/test_views.py +2 -2
  137. wagtail/admin/tests/test_views_generic.py +13 -0
  138. wagtail/admin/tests/test_widgets.py +3 -3
  139. wagtail/admin/tests/test_workflows.py +172 -27
  140. wagtail/admin/tests/tests.py +1 -1
  141. wagtail/admin/tests/viewsets/test_model_viewset.py +55 -3
  142. wagtail/admin/ui/side_panels.py +19 -0
  143. wagtail/admin/ui/sidebar.py +4 -3
  144. wagtail/admin/ui/tables/__init__.py +14 -1
  145. wagtail/admin/ui/tables/pages.py +6 -1
  146. wagtail/admin/urls/pages.py +10 -1
  147. wagtail/admin/urls/workflows.py +6 -1
  148. wagtail/admin/views/account.py +5 -1
  149. wagtail/admin/views/collections.py +0 -2
  150. wagtail/admin/views/generic/base.py +118 -1
  151. wagtail/admin/views/generic/history.py +158 -26
  152. wagtail/admin/views/generic/models.py +113 -99
  153. wagtail/admin/views/home.py +24 -9
  154. wagtail/admin/views/page_privacy.py +54 -30
  155. wagtail/admin/views/pages/history.py +11 -4
  156. wagtail/admin/views/pages/listing.py +76 -89
  157. wagtail/admin/views/pages/preview.py +1 -1
  158. wagtail/admin/views/pages/search.py +27 -71
  159. wagtail/admin/views/pages/usage.py +63 -24
  160. wagtail/admin/views/pages/utils.py +4 -3
  161. wagtail/admin/views/reports/base.py +0 -6
  162. wagtail/admin/views/workflows.py +67 -25
  163. wagtail/admin/viewsets/model.py +4 -3
  164. wagtail/admin/widgets/chooser.py +2 -1
  165. wagtail/api/v2/tests/test_pages.py +15 -2
  166. wagtail/blocks/field_block.py +15 -3
  167. wagtail/blocks/static_block.py +3 -0
  168. wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.mo +0 -0
  169. wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +29 -1
  170. wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +15 -11
  171. wagtail/contrib/forms/templates/wagtailforms/confirm_delete.html +1 -0
  172. wagtail/contrib/forms/templates/wagtailforms/index.html +1 -1
  173. wagtail/contrib/forms/templates/wagtailforms/index_results.html +1 -1
  174. wagtail/contrib/forms/templates/wagtailforms/list_submissions.html +2 -1
  175. wagtail/contrib/forms/templates/wagtailforms/panels/form_responses_panel.html +2 -2
  176. wagtail/contrib/forms/tests/test_views.py +234 -35
  177. wagtail/contrib/forms/utils.py +8 -14
  178. wagtail/contrib/forms/views.py +72 -27
  179. wagtail/contrib/frontend_cache/backends/azure.py +1 -1
  180. wagtail/contrib/frontend_cache/backends/cloudfront.py +2 -2
  181. wagtail/contrib/frontend_cache/backends/dummy.py +11 -0
  182. wagtail/contrib/frontend_cache/tests.py +31 -37
  183. wagtail/contrib/frontend_cache/utils.py +12 -5
  184. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.mo +0 -0
  185. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +16 -1
  186. wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +20 -24
  187. wagtail/contrib/redirects/models.py +16 -1
  188. wagtail/contrib/redirects/signal_handlers.py +18 -3
  189. wagtail/contrib/redirects/templates/wagtailredirects/add.html +5 -16
  190. wagtail/contrib/redirects/templates/wagtailredirects/import_summary.html +1 -1
  191. wagtail/contrib/redirects/tests/test_redirects.py +49 -6
  192. wagtail/contrib/redirects/tests/test_signal_handlers.py +42 -1
  193. wagtail/contrib/redirects/views.py +27 -3
  194. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.mo +0 -0
  195. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +60 -1
  196. wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +12 -18
  197. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/add.html +5 -8
  198. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/edit.html +15 -10
  199. wagtail/contrib/search_promotions/tests.py +13 -2
  200. wagtail/contrib/search_promotions/views.py +15 -3
  201. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.mo +0 -0
  202. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +6 -1
  203. wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +2 -10
  204. wagtail/contrib/settings/templates/wagtailsettings/edit.html +12 -45
  205. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.mo +0 -0
  206. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +13 -1
  207. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.mo +0 -0
  208. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +3 -0
  209. wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +4 -4
  210. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.mo +0 -0
  211. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +5 -2
  212. wagtail/contrib/simple_translation/tests/test_views.py +51 -0
  213. wagtail/contrib/simple_translation/wagtail_hooks.py +16 -11
  214. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.mo +0 -0
  215. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +5 -1
  216. wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
  217. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.mo +0 -0
  218. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +27 -1
  219. wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
  220. wagtail/contrib/typed_table_block/blocks.py +25 -0
  221. wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.mo +0 -0
  222. wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +12 -1
  223. wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
  224. wagtail/contrib/typed_table_block/tests.py +24 -1
  225. wagtail/coreutils.py +5 -11
  226. wagtail/documents/admin_urls.py +2 -2
  227. wagtail/documents/locale/cy/LC_MESSAGES/django.mo +0 -0
  228. wagtail/documents/locale/cy/LC_MESSAGES/django.po +10 -0
  229. wagtail/documents/locale/en/LC_MESSAGES/django.po +61 -76
  230. wagtail/documents/migrations/0014_alter_document_file_size.py +18 -0
  231. wagtail/documents/models.py +1 -1
  232. wagtail/documents/rich_text/__init__.py +1 -3
  233. wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
  234. wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_add_tags.html +5 -1
  235. wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_add_to_collection.html +5 -1
  236. wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_delete.html +11 -5
  237. wagtail/documents/templates/wagtaildocs/documents/add.html +13 -41
  238. wagtail/documents/templates/wagtaildocs/documents/edit.html +28 -56
  239. wagtail/documents/templates/wagtaildocs/documents/index.html +1 -4
  240. wagtail/documents/templates/wagtaildocs/homepage/site_summary_documents.html +2 -2
  241. wagtail/documents/templates/wagtaildocs/multiple/add.html +36 -41
  242. wagtail/documents/tests/test_admin_views.py +64 -6
  243. wagtail/documents/tests/test_site_summary.py +3 -3
  244. wagtail/documents/views/documents.py +103 -113
  245. wagtail/documents/views/multiple.py +19 -1
  246. wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
  247. wagtail/embeds/oembed_providers.py +9 -19
  248. wagtail/fields.py +43 -27
  249. wagtail/images/admin_urls.py +2 -2
  250. wagtail/images/blocks.py +230 -2
  251. wagtail/images/fields.py +17 -29
  252. wagtail/images/image_operations.py +1 -1
  253. wagtail/images/locale/cy/LC_MESSAGES/django.mo +0 -0
  254. wagtail/images/locale/cy/LC_MESSAGES/django.po +128 -1
  255. wagtail/images/locale/en/LC_MESSAGES/django.po +119 -129
  256. wagtail/images/migrations/0025_alter_image_file_alter_rendition_file.py +36 -43
  257. wagtail/images/migrations/0027_image_description.py +20 -0
  258. wagtail/images/models.py +120 -45
  259. wagtail/images/rich_text/__init__.py +1 -3
  260. wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
  261. wagtail/images/static/wagtailimages/js/image-block.js +1 -0
  262. wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_add_tags.html +5 -1
  263. wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_add_to_collection.html +5 -1
  264. wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_delete.html +11 -5
  265. wagtail/images/templates/wagtailimages/chooser/results.html +2 -2
  266. wagtail/images/templates/wagtailimages/homepage/site_summary_images.html +2 -2
  267. wagtail/images/templates/wagtailimages/images/_file_field.html +2 -2
  268. wagtail/images/templates/wagtailimages/images/add.html +13 -31
  269. wagtail/images/templates/wagtailimages/images/edit.html +53 -82
  270. wagtail/images/templates/wagtailimages/images/index.html +1 -4
  271. wagtail/images/templates/wagtailimages/images/url_generator.html +1 -1
  272. wagtail/images/templates/wagtailimages/multiple/add.html +40 -47
  273. wagtail/images/templates/wagtailimages/widgets/image.html +5 -0
  274. wagtail/images/templates/wagtailimages/widgets/image_chooser.html +1 -1
  275. wagtail/images/tests/test_admin_views.py +70 -10
  276. wagtail/images/tests/test_blocks.py +367 -1
  277. wagtail/images/tests/test_image_operations.py +23 -0
  278. wagtail/images/tests/test_models.py +20 -0
  279. wagtail/images/tests/test_signal_handlers.py +99 -95
  280. wagtail/images/tests/test_site_summary.py +3 -3
  281. wagtail/images/tests/test_templatetags.py +11 -7
  282. wagtail/images/tests/tests.py +4 -0
  283. wagtail/images/views/images.py +103 -104
  284. wagtail/images/views/multiple.py +17 -1
  285. wagtail/locale/cy/LC_MESSAGES/django.mo +0 -0
  286. wagtail/locale/cy/LC_MESSAGES/django.po +3 -0
  287. wagtail/locale/en/LC_MESSAGES/django.po +137 -125
  288. wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
  289. wagtail/locale/sl/LC_MESSAGES/django.po +3 -0
  290. wagtail/locales/locale/en/LC_MESSAGES/django.po +8 -8
  291. wagtail/locales/views.py +4 -1
  292. wagtail/migrations/0089_log_entry_data_json_null_to_object.py +1 -7
  293. wagtail/models/__init__.py +122 -14
  294. wagtail/models/audit_log.py +1 -3
  295. wagtail/models/i18n.py +1 -2
  296. wagtail/project_template/Dockerfile +3 -3
  297. wagtail/project_template/requirements.txt +2 -2
  298. wagtail/query.py +17 -4
  299. wagtail/rich_text/__init__.py +2 -3
  300. wagtail/rich_text/pages.py +2 -4
  301. wagtail/rich_text/rewriters.py +2 -2
  302. wagtail/search/backends/database/mysql/query.py +3 -3
  303. wagtail/search/backends/database/sqlite/query.py +6 -6
  304. wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
  305. wagtail/sites/locale/en/LC_MESSAGES/django.po +6 -6
  306. wagtail/sites/views.py +0 -1
  307. wagtail/snippets/action_menu.py +14 -4
  308. wagtail/snippets/locale/cy/LC_MESSAGES/django.mo +0 -0
  309. wagtail/snippets/locale/cy/LC_MESSAGES/django.po +73 -1
  310. wagtail/snippets/locale/en/LC_MESSAGES/django.po +27 -33
  311. wagtail/snippets/static/wagtailsnippets/js/snippet-chooser-telepath.js +1 -1
  312. wagtail/snippets/static/wagtailsnippets/js/snippet-chooser.js +1 -1
  313. wagtail/snippets/templates/wagtailsnippets/bulk_actions/confirm_bulk_delete.html +5 -3
  314. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/locked.html +1 -1
  315. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/menu.html +1 -11
  316. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/menu_item.html +1 -6
  317. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/publish.html +1 -1
  318. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/save.html +1 -1
  319. wagtail/snippets/templates/wagtailsnippets/snippets/create.html +1 -18
  320. wagtail/snippets/templates/wagtailsnippets/snippets/edit.html +1 -14
  321. wagtail/snippets/templates/wagtailsnippets/snippets/index.html +2 -5
  322. wagtail/snippets/tests/test_preview.py +193 -61
  323. wagtail/snippets/tests/test_snippets.py +247 -38
  324. wagtail/snippets/tests/test_usage.py +5 -0
  325. wagtail/snippets/tests/test_viewset.py +25 -9
  326. wagtail/snippets/tests/test_workflows.py +232 -19
  327. wagtail/snippets/views/snippets.py +1 -10
  328. wagtail/test/numberformat.py +104 -0
  329. wagtail/test/settings.py +10 -0
  330. wagtail/test/settings_ui.py +2 -0
  331. wagtail/test/testapp/migrations/0010_alter_customimage_file_and_more.py +71 -78
  332. wagtail/test/testapp/migrations/0040_nocreatablesubpagetypespage_nosubpagetypespage.py +54 -0
  333. wagtail/test/testapp/migrations/0041_alter_jsonstreammodel_options.py +17 -0
  334. wagtail/test/testapp/migrations/0042_alter_customdocument_file_size_and_more.py +28 -0
  335. wagtail/test/testapp/migrations/0043_customimage_description.py +41 -0
  336. wagtail/test/testapp/migrations/0044_custompreviewsizesmodel_custompreviewsizespage.py +52 -0
  337. wagtail/test/testapp/migrations/0045_alter_streampage_body.py +52 -0
  338. wagtail/test/testapp/models.py +62 -4
  339. wagtail/test/testapp/rich_text.py +2 -2
  340. wagtail/test/testapp/templates/tests/form_page_landing.html +2 -1
  341. wagtail/test/testapp/urls.py +5 -0
  342. wagtail/test/testapp/views.py +5 -0
  343. wagtail/test/utils/page_tests.py +5 -5
  344. wagtail/test/utils/template_tests.py +2 -2
  345. wagtail/tests/test_blocks.py +15 -0
  346. wagtail/tests/test_page_permissions.py +109 -0
  347. wagtail/tests/test_revision_model.py +27 -0
  348. wagtail/tests/test_signals.py +21 -2
  349. wagtail/tests/test_tests.py +30 -0
  350. wagtail/users/locale/cy/LC_MESSAGES/django.mo +0 -0
  351. wagtail/users/locale/cy/LC_MESSAGES/django.po +118 -1
  352. wagtail/users/locale/dv/LC_MESSAGES/django.mo +0 -0
  353. wagtail/users/locale/dv/LC_MESSAGES/django.po +3 -0
  354. wagtail/users/locale/en/LC_MESSAGES/django.po +89 -113
  355. wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
  356. wagtail/users/locale/sl/LC_MESSAGES/django.po +3 -0
  357. wagtail/users/migrations/0014_userprofile_contrast.py +23 -0
  358. wagtail/users/models.py +11 -0
  359. wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_assign_role.html +5 -1
  360. wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_delete.html +5 -1
  361. wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_set_active_state.html +5 -1
  362. wagtail/users/templates/wagtailusers/groups/create.html +19 -17
  363. wagtail/users/templates/wagtailusers/groups/edit.html +2 -40
  364. wagtail/users/templates/wagtailusers/groups/includes/formatted_permissions.html +1 -62
  365. wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.html +0 -1
  366. wagtail/users/templates/wagtailusers/users/create.html +46 -50
  367. wagtail/users/templates/wagtailusers/users/edit.html +45 -62
  368. wagtail/users/templates/wagtailusers/users/index.html +1 -4
  369. wagtail/users/templatetags/wagtailusers_tags.py +1 -5
  370. wagtail/users/tests/test_admin_views.py +85 -66
  371. wagtail/users/views/groups.py +4 -1
  372. wagtail/users/views/users.py +2 -0
  373. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/METADATA +6 -6
  374. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/RECORD +378 -367
  375. wagtail/admin/static/wagtailadmin/js/preview-panel.js +0 -2
  376. wagtail/admin/static/wagtailadmin/js/preview-panel.js.LICENSE.txt +0 -11
  377. wagtail/admin/templates/wagtailadmin/generic/history_results.html +0 -1
  378. wagtail/admin/templates/wagtailadmin/page_privacy/ancestor_privacy.html +0 -3
  379. wagtail/admin/templates/wagtailadmin/pages/usage_results.html +0 -6
  380. wagtail/admin/templates/wagtailadmin/shared/workflow_history/index.html +0 -17
  381. wagtail/admin/templates/wagtailadmin/shared/workflow_history/results.html +0 -17
  382. wagtail/admin/templates/wagtailadmin/workflows/usage.html +0 -44
  383. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/LICENSE +0 -0
  384. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/WHEEL +0 -0
  385. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/entry_points.txt +0 -0
  386. {wagtail-6.2.2.dist-info → wagtail-6.3rc2.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t={412:(e,t,n)=>{var a=n(6664),r=n(2833);const l=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const n=document.querySelector(`#${e.getAttribute("aria-controls")}`);n&&(e.setAttribute("aria-expanded",`${t}`),t?n.removeAttribute("hidden"):"onbeforematch"in document.body?n.setAttribute("hidden","until-found"):n.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function i(e){const t=e.closest("[data-panel]"),n=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!n||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const a=l.bind(null,e),r=t.classList.contains("collapsed"),i=n.querySelector('[aria-invalid="true"], .error, .w-field--error'),o=r&&!i;o&&a(!1),e.addEventListener("click",a.bind(null,void 0));const s=t.querySelector("[data-panel-heading]");s&&s.addEventListener("click",a.bind(null,void 0)),n.addEventListener("beforematch",a.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!o}}))}var o=n(2427),s=n.n(o),c=n(6931),d=n.n(c),u=n(8667),m=n(1238);const p=({expanded:e,floating:t,insideMinimap:n,onClick:a})=>s().createElement("button",{type:"button","aria-expanded":e,onClick:a,className:`button button-small button-secondary w-minimap__collapse-all ${t?"w-minimap__collapse-all--floating":""} ${n?"w-minimap__collapse-all--inside":""}`},s().createElement(m.A,{name:e?"collapse-up":"collapse-down"}),e?(0,r.AP)("Collapse all"):(0,r.AP)("Expand all")),g=s().createElement("span",{className:"w-required-mark"},"*"),f=({item:e,intersects:t,expanded:n,onClick:a})=>{const{href:l,label:i,icon:o,required:c,errorCount:d,level:u}=e,p=d>0,f=(0,r.WI)("%(num)s error","%(num)s errors",d).replace("%(num)s",`${d}`),h=i.length>22?`${i.substring(0,22)}…`:i;return s().createElement("a",{href:l,className:`w-minimap-item w-minimap-item--${u} ${t?"w-minimap-item--active":""} ${p?"w-minimap-item--error":""}`,onClick:a.bind(null,e),"aria-current":t,tabIndex:n?void 0:-1,"aria-describedby":n?void 0:"w-minimap-toggle"},p?s().createElement("div",{className:"w-minimap-item__errors","aria-label":f},d):null,s().createElement(m.A,{name:"minus",className:"w-minimap-item__placeholder"}),"h1"!==u&&"h2"!==u?s().createElement(m.A,{name:o,className:"w-minimap-item__icon"}):null,s().createElement("span",{className:"w-minimap-item__label"},s().createElement("span",{className:"w-minimap-item__text"},h),c?g:null))},h={root:null,rootMargin:"-50px 0px -70px 0px",threshold:.1},b=(e,{target:t,isIntersecting:n})=>{const a=t.closest("[data-panel]")?.id;return a?(e[`#${a}`]=n,e):e},v=({container:e,anchorsContainer:t,links:n,onUpdate:a,toggleAllPanels:i})=>{const c=(0,o.useMemo)((()=>(()=>{let e="false";try{e=localStorage.getItem("wagtail:minimap-expanded")||e}catch{}return"true"===e})()),[]),[d,g]=(0,o.useState)(c),v=(0,o.useCallback)(((e=!d)=>{g(e),document.body.classList.toggle("minimap-open",e);try{localStorage.setItem("wagtail:minimap-expanded",e?"true":"false")}catch{}}),[d,g]),[y,E]=(0,o.useState)(!0),[w,S]=(0,o.useState)({}),x=(0,o.useRef)(null),A=(0,o.useRef)({}),q=(0,o.useRef)(null),L=(0,o.useRef)(null),_=(e,t)=>{d||t.preventDefault(),l(e.toggle,!0),v(!0)};return(0,o.useEffect)((()=>{v(c)}),[]),(0,o.useEffect)((()=>{x.current||(x.current=new IntersectionObserver((t=>{A.current=t.reduce(b,{...A.current}),q.current||(q.current=(0,u.s)((e=>{S(e),(e=>{const t=e.querySelectorAll('a[aria-current="true"]');if(0===t.length||e.scrollHeight===e.clientHeight)return;const n=t[0],a=t[t.length-1];let r=e.scrollTop;n&&n.offsetTop<e.scrollTop&&(r=n.offsetTop),a&&a.offsetTop>e.scrollTop+e.offsetHeight&&(r=a.offsetTop-e.offsetHeight+a.offsetHeight),e.scrollTop=r})(L.current)}),100)),q.current(A.current),t.forEach((({target:t})=>{t.closest(".deleted")&&a(e)}))}),h));const t=x.current;return t.disconnect(),n.forEach((({panel:e,toggle:n})=>{const a=e.matches(".w-panel--nested")&&null===e.closest("[data-field]");t.observe(a?n:e)})),()=>{t.disconnect()}}),[n,e]),(0,o.useEffect)((()=>{E(!0)}),[t,E]),s().createElement("div",null,s().createElement(p,{expanded:y,onClick:()=>{E(!y),i(!y)},floating:!0,insideMinimap:d}),s().createElement("div",{className:"w-minimap "+(d?"w-minimap--expanded":"")},s().createElement("div",{className:"w-minimap__header"},s().createElement("button",{id:"w-minimap-toggle",type:"button","aria-expanded":d,onClick:()=>v(!d),className:"w-minimap__toggle","aria-label":(0,r.AP)("Toggle side panel")},s().createElement(m.A,{name:"expand-right"}))),s().createElement("ol",{className:"w-minimap__list",ref:L},n.map((e=>s().createElement("li",{key:e.href},s().createElement(f,{item:e,intersects:w[e.href],expanded:d,onClick:_}))))),s().createElement("div",{className:"w-minimap__footer"})))},y=e=>{const t=e.closest("[data-panel]"),n=t?.getAttribute("aria-labelledby"),a=t?.querySelector(`#${n}`),r=t?.querySelector("[data-panel-toggle]"),l=e.closest("[data-inline-panel-child].deleted");if(!t||!a||!r||l)return null;const i=a.querySelector("[data-panel-heading-text]"),o=i?.textContent||a.textContent?.replace(/\s+\*\s+$/g,"").trim(),s=null!==t.querySelector("[data-panel-required]"),c=r.querySelector("use"),d=c?.getAttribute("href")?.replace("#icon-","")||"",u=`h${a.getAttribute("aria-level")||a.tagName[1]||2}`,m=[].slice.call(t.querySelectorAll(".error-message")).filter((e=>e.closest("[data-panel]")===t)).length;return{anchor:e,toggle:r,panel:t,icon:d,label:o||"",href:e.getAttribute("href")||"",required:s,errorCount:m,level:u}},E=e=>{let t=document.body;const n=document.querySelector("[data-tabs]");if(n){const e=n.querySelector('[role="tab"][aria-selected="true"]'),a=e?.getAttribute("aria-controls");t=n.querySelector(`#${a}`)||t}const a=t.querySelectorAll("[data-panel-anchor]"),r=[].slice.call(a).map(y).filter(Boolean);d().render(s().createElement(v,{container:e,anchorsContainer:t,links:r,onUpdate:E,toggleAllPanels:e=>{r.forEach(((t,n)=>{0===n&&t.href.includes("title")||l(t.toggle,e)}))}}),e)};document.addEventListener("DOMContentLoaded",(()=>{(0,a.d)(),function(){const e=document.querySelector("[data-form-side]");if(!e)return;const t="formSideExplorer"in e.dataset,n=document.querySelector("[data-form-side-resize-grip]"),a=document.querySelector("[data-form-side-width-input]"),l=()=>{const t=getComputedStyle(e),n=parseFloat(t.minWidth),a=parseFloat(t.maxWidth),r=parseFloat(t.width),l=a-n;return{minWidth:n,maxWidth:a,width:r,range:l,percentage:(r-n)/l*100}},i=e=>"rtl"===document.documentElement.dir?e:100-e;let o;const s=n=>{clearTimeout(o);const r=document.querySelector("body"),s=document.querySelector(`[data-side-panel-toggle="${n}"]`);if((!n||s)&&(""===n?(e.classList.remove("form-side--open"),e.removeAttribute("aria-labelledby")):(e.classList.add("form-side--open"),e.setAttribute("aria-labelledby",`side-panel-${n}-title`)),document.querySelectorAll("[data-side-panel]").forEach((t=>{const a=t.dataset.sidePanel;if(a===n)t.hidden&&(t.hidden=!1,t.dispatchEvent(new CustomEvent("show")),e.classList.add(`form-side--${a}`),r.classList.add("side-panel-open"));else if(!t.hidden){const l=()=>{t.hidden=!0,t.dispatchEvent(new CustomEvent("hide")),e.classList.remove(`form-side--${a}`)};""===n?(r.classList.remove("side-panel-open"),o=setTimeout(l,500)):l()}})),document.querySelectorAll("[data-side-panel-toggle]").forEach((e=>{e.setAttribute("aria-expanded",e.dataset.sidePanelToggle===n?"true":"false")})),!t)){try{localStorage.setItem("wagtail:side-panel-open",n)}catch(e){}setTimeout((()=>{const{percentage:e}=l();a.value=i(e)}),500)}};document.querySelectorAll("[data-side-panel]").forEach((e=>{e.addEventListener("open",(()=>{s(e.dataset.sidePanel)}))})),document.querySelectorAll("[data-side-panel-toggle]").forEach((e=>{e.addEventListener("click",(()=>{(e=>{const t=!document.querySelector(`[data-side-panel="${e}"]`).hasAttribute("hidden");s(t?"":e)})(e.dataset.sidePanelToggle)}))}));const c=document.querySelector("[data-form-side-close-button]");c instanceof HTMLButtonElement&&c.addEventListener("click",(()=>{s("")}));const d=e=>{const{minWidth:n,maxWidth:o,range:s,width:c}=l(),d=parseInt(Math.max(n,Math.min(e,o)),10)||c,u=(0,r.WI)("%(num)s pixel","%(num)s pixels",d).replace("%(num)s",d);document.documentElement.style.setProperty("--side-panel-width",`${d}px`);const m=(d-n)/s*100;if(a.value=i(m),a.setAttribute("aria-valuetext",u),!t)try{localStorage.setItem("wagtail:side-panel-width",d)}catch(e){}};let u,m;const p=e=>{if(!e.screenX||!u||!m)return;const t="rtl"===document.documentElement.dir?-1:1,n=u-e.screenX;d(m+n*t)},g=e=>{n.releasePointerCapture(e.pointerId),n.removeEventListener("pointermove",p),document.removeEventListener("pointerup",g),document.body.classList.remove("side-panel-resizing")};n.addEventListener("pointerdown",(e=>{0===e.button&&(u=e.screenX,m=l().width,document.body.classList.add("side-panel-resizing"),n.setPointerCapture(e.pointerId),n.addEventListener("pointermove",p),document.addEventListener("pointerup",g))})),a.addEventListener("change",(e=>{const{minWidth:t,range:n}=l(),a=parseInt(e.target.value,10),r=i(a);d(t+n*r/100)})),setTimeout((()=>{try{const e=localStorage.getItem("wagtail:side-panel-open");!t&&e&&s(e),d(localStorage.getItem("wagtail:side-panel-width"))}catch(e){}setTimeout((()=>{e.classList.remove("form-side--initial")}))}))}(),function(e=document.querySelectorAll("[data-panel-toggle]")){e.forEach(i)}()})),window.addEventListener("load",(()=>{!function(e=document.querySelector("[data-panel]:target")){e&&e.scrollIntoView({behavior:"smooth"})}(),((e=document.querySelector("[data-minimap-container]"))=>{if(!e)return;if(!document.body.querySelectorAll("[data-panel-anchor]").length)return;const t=(0,u.s)(E.bind(null,e),100);document.addEventListener("wagtail:tab-changed",t),document.addEventListener("wagtail:panel-init",t);const n=()=>e.style.setProperty("--offset-top",`${e.offsetTop}px`),a=(0,u.s)(n,100);document.addEventListener("resize",a),n(),t(e)})()}))}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,a),l.exports}a.m=t,e=[],a.O=(t,n,r,l)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var[n,r,l]=e[d],o=!0,s=0;s<n.length;s++)(!1&l||i>=l)&&Object.keys(a.O).every((e=>a.O[e](n[s])))?n.splice(s--,1):(o=!1,l<i&&(i=l));if(o){e.splice(d--,1);var c=r();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]=[n,r,l]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.j=445,(()=>{var e={445:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[i,o,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in o)a.o(o,r)&&(a.m[r]=o[r]);if(s)var d=s(a)}for(t&&t(n);c<i.length;c++)l=i[c],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(d)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=a.O(void 0,[321],(()=>a(412)));r=a.O(r)})();
1
+ (()=>{"use strict";var e,t={412:(e,t,n)=>{var a=n(6664),r=n(2833);var l=n(4072);const i=(e,t=!("true"===e.getAttribute("aria-expanded")))=>{const n=document.querySelector(`#${e.getAttribute("aria-controls")}`);n&&(e.setAttribute("aria-expanded",`${t}`),t?n.removeAttribute("hidden"):"onbeforematch"in document.body?n.setAttribute("hidden","until-found"):n.setAttribute("hidden",""),e.dispatchEvent(new CustomEvent("commentAnchorVisibilityChange",{bubbles:!0})),e.dispatchEvent(new CustomEvent("wagtail:panel-toggle",{bubbles:!0,cancelable:!1,detail:{expanded:t}})))};function o(e){const t=e.closest("[data-panel]"),n=document.querySelector(`#${e.getAttribute("aria-controls")}`);if(!n||!t||t.collapsibleInitialised)return;t.collapsibleInitialised=!0;const a=i.bind(null,e),r=t.classList.contains("collapsed"),l=n.querySelector('[aria-invalid="true"], .error, .w-field--error'),o=r&&!l;o&&a(!1),e.addEventListener("click",a.bind(null,void 0));const s=t.querySelector("[data-panel-heading]");s&&s.addEventListener("click",a.bind(null,void 0)),n.addEventListener("beforematch",a.bind(null,!0)),e.dispatchEvent(new CustomEvent("wagtail:panel-init",{bubbles:!0,cancelable:!1,detail:{expanded:!o}}))}var s=n(2427),c=n.n(s),d=n(6931),u=n.n(d),m=n(8667),p=n(1238);const g=({expanded:e,floating:t,insideMinimap:n,onClick:a})=>c().createElement("button",{type:"button","aria-expanded":e,onClick:a,className:`button button-small button-secondary w-minimap__collapse-all ${t?"w-minimap__collapse-all--floating":""} ${n?"w-minimap__collapse-all--inside":""}`},c().createElement(p.A,{name:e?"collapse-up":"collapse-down"}),e?(0,r.AP)("Collapse all"):(0,r.AP)("Expand all")),f=c().createElement("span",{className:"w-required-mark"},"*"),h=({item:e,intersects:t,expanded:n,onClick:a})=>{const{href:l,label:i,icon:o,required:s,errorCount:d,level:u}=e,m=d>0,g=(0,r.WI)("%(num)s error","%(num)s errors",d).replace("%(num)s",`${d}`),h=i.length>22?`${i.substring(0,22)}…`:i;return c().createElement("a",{href:l,className:`w-minimap-item w-minimap-item--${u} ${t?"w-minimap-item--active":""} ${m?"w-minimap-item--error":""}`,onClick:a.bind(null,e),"aria-current":t,tabIndex:n?void 0:-1,"aria-describedby":n?void 0:"w-minimap-toggle"},m?c().createElement("div",{className:"w-minimap-item__errors","aria-label":g},d):null,c().createElement(p.A,{name:"minus",className:"w-minimap-item__placeholder"}),"h1"!==u&&"h2"!==u?c().createElement(p.A,{name:o,className:"w-minimap-item__icon"}):null,c().createElement("span",{className:"w-minimap-item__label"},c().createElement("span",{className:"w-minimap-item__text"},h),s?f:null))},b={root:null,rootMargin:"-50px 0px -70px 0px",threshold:.1},v=(e,{target:t,isIntersecting:n})=>{const a=t.closest("[data-panel]")?.id;return a?(e[`#${a}`]=n,e):e},y=({container:e,anchorsContainer:t,links:n,onUpdate:a,toggleAllPanels:l})=>{const o=(0,s.useMemo)((()=>(()=>{let e="false";try{e=localStorage.getItem("wagtail:minimap-expanded")||e}catch{}return"true"===e})()),[]),[d,u]=(0,s.useState)(o),f=(0,s.useCallback)(((e=!d)=>{u(e),document.body.classList.toggle("minimap-open",e);try{localStorage.setItem("wagtail:minimap-expanded",e?"true":"false")}catch{}}),[d,u]),[y,E]=(0,s.useState)(!0),[w,S]=(0,s.useState)({}),x=(0,s.useRef)(null),A=(0,s.useRef)({}),q=(0,s.useRef)(null),L=(0,s.useRef)(null),_=(e,t)=>{d||t.preventDefault(),i(e.toggle,!0),f(!0)};return(0,s.useEffect)((()=>{f(o)}),[]),(0,s.useEffect)((()=>{x.current||(x.current=new IntersectionObserver((t=>{A.current=t.reduce(v,{...A.current}),q.current||(q.current=(0,m.s)((e=>{S(e),(e=>{const t=e.querySelectorAll('a[aria-current="true"]');if(0===t.length||e.scrollHeight===e.clientHeight)return;const n=t[0],a=t[t.length-1];let r=e.scrollTop;n&&n.offsetTop<e.scrollTop&&(r=n.offsetTop),a&&a.offsetTop>e.scrollTop+e.offsetHeight&&(r=a.offsetTop-e.offsetHeight+a.offsetHeight),e.scrollTop=r})(L.current)}),100)),q.current(A.current),t.forEach((({target:t})=>{t.closest(".deleted")&&a(e)}))}),b));const t=x.current;return t.disconnect(),n.forEach((({panel:e,toggle:n})=>{const a=e.matches(".w-panel--nested")&&null===e.closest("[data-field]");t.observe(a?n:e)})),()=>{t.disconnect()}}),[n,e]),(0,s.useEffect)((()=>{E(!0)}),[t,E]),c().createElement("div",null,c().createElement(g,{expanded:y,onClick:()=>{E(!y),l(!y)},floating:!0,insideMinimap:d}),c().createElement("div",{className:"w-minimap "+(d?"w-minimap--expanded":"")},c().createElement("div",{className:"w-minimap__header"},c().createElement("button",{id:"w-minimap-toggle",type:"button","aria-expanded":d,onClick:()=>f(!d),className:"w-minimap__toggle","aria-label":(0,r.AP)("Toggle side panel")},c().createElement(p.A,{name:"expand-right"}))),c().createElement("ol",{className:"w-minimap__list",ref:L},n.map((e=>c().createElement("li",{key:e.href},c().createElement(h,{item:e,intersects:w[e.href],expanded:d,onClick:_}))))),c().createElement("div",{className:"w-minimap__footer"})))},E=e=>{const t=e.closest("[data-panel]"),n=t?.getAttribute("aria-labelledby"),a=t?.querySelector(`#${n}`),r=t?.querySelector("[data-panel-toggle]"),l=e.closest("[data-inline-panel-child].deleted");if(!t||!a||!r||l)return null;const i=a.querySelector("[data-panel-heading-text]"),o=i?.textContent||a.textContent?.replace(/\s+\*\s+$/g,"").trim(),s=null!==t.querySelector("[data-panel-required]"),c=r.querySelector("use"),d=c?.getAttribute("href")?.replace("#icon-","")||"",u=`h${a.getAttribute("aria-level")||a.tagName[1]||2}`,m=[].slice.call(t.querySelectorAll(".error-message")).filter((e=>e.closest("[data-panel]")===t)).length;return{anchor:e,toggle:r,panel:t,icon:d,label:o||"",href:e.getAttribute("href")||"",required:s,errorCount:m,level:u}},w=e=>{let t=document.body;const n=document.querySelector("[data-tabs]");if(n){const e=n.querySelector('[role="tab"][aria-selected="true"]'),a=e?.getAttribute("aria-controls");t=n.querySelector(`#${a}`)||t}const a=t.querySelectorAll("[data-panel-anchor]"),r=[].slice.call(a).map(E).filter(Boolean);u().render(c().createElement(y,{container:e,anchorsContainer:t,links:r,onUpdate:w,toggleAllPanels:e=>{r.forEach(((t,n)=>{0===n&&t.href.includes("title")||i(t.toggle,e)}))}}),e)};document.addEventListener("DOMContentLoaded",(()=>{(0,a.d)(),function(){const e=document.querySelector("[data-form-side]");if(!e)return;const t="formSideExplorer"in e.dataset,n=document.querySelector("[data-form-side-resize-grip]"),a=document.querySelector("[data-form-side-width-input]"),l=()=>{const t=getComputedStyle(e),n=parseFloat(t.minWidth),a=parseFloat(t.maxWidth),r=parseFloat(t.width),l=a-n;return{minWidth:n,maxWidth:a,width:r,range:l,percentage:(r-n)/l*100}},i=e=>"rtl"===document.documentElement.dir?e:100-e;let o;const s=n=>{clearTimeout(o);const r=document.querySelector("body"),s=document.querySelector(`[data-side-panel="${n}"]`);if((!n||s)&&(""===n?(e.classList.remove("form-side--open"),e.removeAttribute("aria-labelledby")):(e.classList.add("form-side--open"),e.setAttribute("aria-labelledby",`side-panel-${n}-title`)),document.querySelectorAll("[data-side-panel]").forEach((t=>{const a=t.dataset.sidePanel;if(a===n)t.hidden&&(t.hidden=!1,e.classList.add(`form-side--${a}`),r.classList.add("side-panel-open"));else if(!t.hidden){const l=()=>{t.hidden=!0,t.dispatchEvent(new CustomEvent("hide")),e.classList.remove(`form-side--${a}`)};""===n?(r.classList.remove("side-panel-open"),o=setTimeout(l,500)):l()}})),document.querySelectorAll("[data-side-panel-toggle]").forEach((e=>{e.setAttribute("aria-expanded",e.dataset.sidePanelToggle===n?"true":"false")})),s&&s.dispatchEvent(new CustomEvent("show")),!t)){try{localStorage.setItem("wagtail:side-panel-open",n)}catch(e){}setTimeout((()=>{const{percentage:e}=l();a.value=i(e)}),500)}};document.querySelectorAll("[data-side-panel]").forEach((e=>{e.addEventListener("open",(()=>{s(e.dataset.sidePanel)}))})),document.querySelectorAll("[data-side-panel-toggle]").forEach((e=>{e.addEventListener("click",(()=>{(e=>{const t=!document.querySelector(`[data-side-panel="${e}"]`).hasAttribute("hidden");s(t?"":e)})(e.dataset.sidePanelToggle)}))}));const c=document.querySelector("[data-form-side-close-button]");c instanceof HTMLButtonElement&&c.addEventListener("click",(()=>{s("")}));const d=e=>{const{minWidth:n,maxWidth:o,range:s,width:c}=l(),d=parseInt(Math.max(n,Math.min(e,o)),10)||c,u=(0,r.WI)("%(num)s pixel","%(num)s pixels",d).replace("%(num)s",d);document.documentElement.style.setProperty("--side-panel-width",`${d}px`);const m=(d-n)/s*100;if(a.value=i(m),a.setAttribute("aria-valuetext",u),!t)try{localStorage.setItem("wagtail:side-panel-width",d)}catch(e){}};let u,m;const p=e=>{if(!e.screenX||!u||!m)return;const t="rtl"===document.documentElement.dir?-1:1,n=u-e.screenX;d(m+n*t)},g=e=>{n.releasePointerCapture(e.pointerId),n.removeEventListener("pointermove",p),document.removeEventListener("pointerup",g),document.body.classList.remove("side-panel-resizing")};n.addEventListener("pointerdown",(e=>{0===e.button&&(u=e.screenX,m=l().width,document.body.classList.add("side-panel-resizing"),n.setPointerCapture(e.pointerId),n.addEventListener("pointermove",p),document.addEventListener("pointerup",g))})),a.addEventListener("change",(e=>{const{minWidth:t,range:n}=l(),a=parseInt(e.target.value,10),r=i(a);d(t+n*r/100)})),setTimeout((()=>{try{const e=localStorage.getItem("wagtail:side-panel-open");!t&&e&&s(e),d(localStorage.getItem("wagtail:side-panel-width"))}catch(e){}setTimeout((()=>{e.classList.remove("form-side--initial")}))}))}(),function(e=document.querySelectorAll("[data-panel-toggle]")){e.forEach(o)}()})),window.addEventListener("load",(()=>{!function(e=document.getElementById(window.location.hash.slice(1))){const t=e?.matches("[data-panel]")?e:(0,l.KX)();t&&setTimeout((()=>{t.scrollIntoView({behavior:"smooth"})}),100)}(),((e=document.querySelector("[data-minimap-container]"))=>{if(!e)return;if(!document.body.querySelectorAll("[data-panel-anchor]").length)return;const t=(0,m.s)(w.bind(null,e),100);document.addEventListener("wagtail:tab-changed",t),document.addEventListener("wagtail:panel-init",t);const n=()=>e.style.setProperty("--offset-top",`${e.offsetTop}px`),a=(0,m.s)(n,100);document.addEventListener("resize",a),n(),t(e)})()}))}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,a),l.exports}a.m=t,e=[],a.O=(t,n,r,l)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var[n,r,l]=e[d],o=!0,s=0;s<n.length;s++)(!1&l||i>=l)&&Object.keys(a.O).every((e=>a.O[e](n[s])))?n.splice(s--,1):(o=!1,l<i&&(i=l));if(o){e.splice(d--,1);var c=r();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]=[n,r,l]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.j=445,(()=>{var e={445:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,l,[i,o,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in o)a.o(o,r)&&(a.m[r]=o[r]);if(s)var d=s(a)}for(t&&t(n);c<i.length;c++)l=i[c],a.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return a.O(d)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=a.O(void 0,[321],(()=>a(412)));r=a.O(r)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var o,e={8080:(o,e,t)=>{var a=t(1669),n=t.n(a),r=t(6508);function i(o,e,t){const a=document.createElement("input");a.type="hidden",a.name=e,a.value=t,o.appendChild(a)}function c(){const o=document.querySelectorAll("[data-workflow-action-url]"),e=r.HE.CSRF_TOKEN;o.forEach((o=>{o.addEventListener("click",(t=>{if(t.preventDefault(),"launchModal"in o.dataset)ModalWorkflow({url:o.dataset.workflowActionUrl,onload:{action(o){const e=document.createElement("input");e.type="hidden",e.name="next",e.value=window.location,n()("form",o.body).append(e),o.ajaxifyForm(n()("form",o.body))},success(o,e){window.location.href=e.redirect}}});else{const t=document.createElement("form");t.action=o.dataset.workflowActionUrl,t.method="POST",i(t,"csrfmiddlewaretoken",e),i(t,"next",window.location),document.body.appendChild(t),t.submit()}}),{capture:!0})}))}function l(o){const e=n()(o).get(0);document.querySelectorAll("[data-workflow-action-name]").forEach((o=>{o.addEventListener("click",(t=>{"workflowActionModalUrl"in o.dataset?(t.preventDefault(),t.stopPropagation(),ModalWorkflow({url:o.dataset.workflowActionModalUrl,onload:{action(o){o.ajaxifyForm(n()("form",o.body))},success(t,a){i(e,"action-workflow-action","true"),i(e,"workflow-action-name",o.dataset.workflowActionName),i(e,"workflow-action-extra-data",JSON.stringify(a.cleaned_data)),n()(e).submit()}}})):(i(e,"action-workflow-action","true"),i(e,"workflow-action-name",o.dataset.workflowActionName))}),{capture:!0})}))}window._addHiddenInput=i,window.ActivateWorkflowActionsForDashboard=c,window.ActivateWorkflowActionsForEditView=l;const d=document.currentScript,u=d.dataset.activate,f=d.dataset.confirmCancellationUrl;document.addEventListener("DOMContentLoaded",(()=>{if("dashboard"===u?c():"editor"===u&&l("[data-edit-form]"),f){let o=!1;n()("[name=action-publish]").click((e=>{o||(e.stopImmediatePropagation(),e.preventDefault(),window.ModalWorkflow({url:f,onload:{confirm(t,a){n()("[data-confirm-cancellation]",t.body).click((a=>{o=!0,t.close(),e.currentTarget.click()})),n()("[data-cancel-dialog]",t.body).click((o=>{t.close()}))},no_confirmation_needed(t,a){t.close(),o=!0,e.currentTarget.click()}},triggerElement:e.currentTarget}))}))}}))},1669:o=>{o.exports=jQuery}},t={};function a(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,a),r.exports}a.m=e,o=[],a.O=(e,t,n,r)=>{if(!t){var i=1/0;for(u=0;u<o.length;u++){for(var[t,n,r]=o[u],c=!0,l=0;l<t.length;l++)(!1&r||i>=r)&&Object.keys(a.O).every((o=>a.O[o](t[l])))?t.splice(l--,1):(c=!1,r<i&&(i=r));if(c){o.splice(u--,1);var d=n();void 0!==d&&(e=d)}}return e}r=r||0;for(var u=o.length;u>0&&o[u-1][2]>r;u--)o[u]=o[u-1];o[u]=[t,n,r]},a.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return a.d(e,{a:e}),e},a.d=(o,e)=>{for(var t in e)a.o(e,t)&&!a.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(o){if("object"==typeof window)return window}}(),a.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),a.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.j=327,(()=>{var o={327:0};a.O.j=e=>0===o[e];var e=(e,t)=>{var n,r,[i,c,l]=t,d=0;if(i.some((e=>0!==o[e]))){for(n in c)a.o(c,n)&&(a.m[n]=c[n]);if(l)var u=l(a)}for(e&&e(t);d<i.length;d++)r=i[d],a.o(o,r)&&o[r]&&o[r][0](),o[r]=0;return a.O(u)},t=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})();var n=a.O(void 0,[321],(()=>a(8080)));n=a.O(n)})();
1
+ (()=>{"use strict";var o,e={8080:(o,e,t)=>{var a=t(1669),n=t.n(a),r=t(2898);function i(o,e,t){const a=document.createElement("input");a.type="hidden",a.name=e,a.value=t,o.appendChild(a)}function c(){const o=document.querySelectorAll("[data-workflow-action-url]"),e=r.HE.CSRF_TOKEN;o.forEach((o=>{o.addEventListener("click",(t=>{if(t.preventDefault(),"launchModal"in o.dataset)ModalWorkflow({url:o.dataset.workflowActionUrl,onload:{action(o){const e=document.createElement("input");e.type="hidden",e.name="next",e.value=window.location,n()("form",o.body).append(e),o.ajaxifyForm(n()("form",o.body))},success(o,e){window.location.href=e.redirect}}});else{const t=document.createElement("form");t.action=o.dataset.workflowActionUrl,t.method="POST",i(t,"csrfmiddlewaretoken",e),i(t,"next",window.location),document.body.appendChild(t),t.submit()}}),{capture:!0})}))}function l(o){const e=n()(o).get(0);document.querySelectorAll("[data-workflow-action-name]").forEach((o=>{o.addEventListener("click",(t=>{"workflowActionModalUrl"in o.dataset?(t.preventDefault(),t.stopPropagation(),ModalWorkflow({url:o.dataset.workflowActionModalUrl,onload:{action(o){o.ajaxifyForm(n()("form",o.body))},success(t,a){i(e,"action-workflow-action","true"),i(e,"workflow-action-name",o.dataset.workflowActionName),i(e,"workflow-action-extra-data",JSON.stringify(a.cleaned_data)),n()(e).submit()}}})):(i(e,"action-workflow-action","true"),i(e,"workflow-action-name",o.dataset.workflowActionName))}),{capture:!0})}))}window._addHiddenInput=i,window.ActivateWorkflowActionsForDashboard=c,window.ActivateWorkflowActionsForEditView=l;const d=document.currentScript,u=d.dataset.activate,f=d.dataset.confirmCancellationUrl;document.addEventListener("DOMContentLoaded",(()=>{if("dashboard"===u?c():"editor"===u&&l("[data-edit-form]"),f){let o=!1;n()("[name=action-publish]").click((e=>{o||(e.stopImmediatePropagation(),e.preventDefault(),window.ModalWorkflow({url:f,onload:{confirm(t,a){n()("[data-confirm-cancellation]",t.body).click((a=>{o=!0,t.close(),e.currentTarget.click()})),n()("[data-cancel-dialog]",t.body).click((o=>{t.close()}))},no_confirmation_needed(t,a){t.close(),o=!0,e.currentTarget.click()}},triggerElement:e.currentTarget}))}))}}))},1669:o=>{o.exports=jQuery}},t={};function a(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,a),r.exports}a.m=e,o=[],a.O=(e,t,n,r)=>{if(!t){var i=1/0;for(u=0;u<o.length;u++){for(var[t,n,r]=o[u],c=!0,l=0;l<t.length;l++)(!1&r||i>=r)&&Object.keys(a.O).every((o=>a.O[o](t[l])))?t.splice(l--,1):(c=!1,r<i&&(i=r));if(c){o.splice(u--,1);var d=n();void 0!==d&&(e=d)}}return e}r=r||0;for(var u=o.length;u>0&&o[u-1][2]>r;u--)o[u]=o[u-1];o[u]=[t,n,r]},a.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return a.d(e,{a:e}),e},a.d=(o,e)=>{for(var t in e)a.o(e,t)&&!a.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(o){if("object"==typeof window)return window}}(),a.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),a.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.j=327,(()=>{var o={327:0};a.O.j=e=>0===o[e];var e=(e,t)=>{var n,r,[i,c,l]=t,d=0;if(i.some((e=>0!==o[e]))){for(n in c)a.o(c,n)&&(a.m[n]=c[n]);if(l)var u=l(a)}for(e&&e(t);d<i.length;d++)r=i[d],a.o(o,r)&&o[r]&&o[r][0](),o[r]=0;return a.O(u)},t=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})();var n=a.O(void 0,[321],(()=>a(8080)));n=a.O(n)})();
@@ -24,14 +24,16 @@ except AttributeError:
24
24
  use_version_strings = True
25
25
  else:
26
26
  # see if we're using a storage backend using hashed filenames
27
- storage = storages[STATICFILES_STORAGE_ALIAS].__class__
28
- use_version_strings = not issubclass(storage, HashedFilesMixin)
27
+ use_version_strings = not isinstance(
28
+ storages[STATICFILES_STORAGE_ALIAS], HashedFilesMixin
29
+ )
29
30
 
30
31
 
31
32
  if use_version_strings:
32
- # SECRET_KEY is used to prevent exposing the Wagtail version
33
+ # INSTALLED_APPS is used as a unique value to distinguish Wagtail apps
34
+ # and avoid exposing the Wagtail version directly
33
35
  VERSION_HASH = hashlib.sha1(
34
- (__version__ + settings.SECRET_KEY).encode("utf-8")
36
+ "".join([__version__] + list(settings.INSTALLED_APPS)).encode(),
35
37
  ).hexdigest()[:8]
36
38
  else:
37
39
  VERSION_HASH = None
@@ -1,9 +1,7 @@
1
- {% extends "wagtailadmin/generic/base.html" %}
1
+ {% extends "wagtailadmin/generic/form.html" %}
2
2
  {% load i18n wagtailadmin_tags %}
3
3
 
4
- {% block content %}
5
- {% include "wagtailadmin/shared/header.html" with title=_("Account") icon="user" merged=1 %}
6
-
4
+ {% block form_content %}
7
5
  <div class="w-tabs" data-tabs>
8
6
  <div class="w-tabs__wrapper">
9
7
  <div role="tablist" class="w-tabs__list">
@@ -17,62 +15,47 @@
17
15
  </div>
18
16
  </div>
19
17
 
20
- <form action="{% url 'wagtailadmin_account' %}" method="post" enctype="multipart/form-data" novalidate>
21
- <div class="tab-content">
22
- {% csrf_token %}
23
-
24
- {% for tab, panels in panels_by_tab.items %}
25
- <section
26
- id="tab-{{ tab.name|cautious_slugify }}"
27
- class="w-tabs__panel"
28
- role="tabpanel"
29
- hidden
30
- aria-labelledby="tab-label-{{ tab.name|cautious_slugify }}"
31
- >
32
- {% for panel in panels %}
33
- {% panel id=panel.name heading=panel.title heading_size="label" %}
34
- <div class="w-account-settings-panel w-mt-5">
35
- {{ panel.render }}
18
+ <div class="tab-content">
19
+ {% csrf_token %}
20
+
21
+ {% for tab, panels in panels_by_tab.items %}
22
+ <section
23
+ id="tab-{{ tab.name|cautious_slugify }}"
24
+ class="w-tabs__panel"
25
+ role="tabpanel"
26
+ hidden
27
+ aria-labelledby="tab-label-{{ tab.name|cautious_slugify }}"
28
+ >
29
+ {% for panel in panels %}
30
+ {% panel id=panel.name heading=panel.title heading_size="label" %}
31
+ <div class="w-account-settings-panel w-mt-5">
32
+ {{ panel.render }}
33
+ </div>
34
+ {% endpanel %}
35
+ {% endfor %}
36
+ </section>
37
+ {% endfor %}
38
+
39
+ {% if menu_items %}
40
+ <section
41
+ id="tab-actions"
42
+ class="w-tabs__panel"
43
+ role="tabpanel"
44
+ hidden
45
+ aria-labelledby="tab-label-actions"
46
+ >
47
+ <ul class="listing">
48
+ {% for item in menu_items %}
49
+ <li class="row row-flush">
50
+ <div class="col6">
51
+ <a href="{{ item.url }}" class="button button-primary">{{ item.label }}</a>
36
52
  </div>
37
- {% endpanel %}
53
+ <small class="col6">{{ item.help_text }}</small>
54
+ </li>
38
55
  {% endfor %}
39
-
40
- <button type="submit" class="button">{% trans 'Save account details' %}</button>
41
- </section>
42
- {% endfor %}
43
-
44
- {% if menu_items %}
45
- <section
46
- id="tab-actions"
47
- class="w-tabs__panel"
48
- role="tabpanel"
49
- hidden
50
- aria-labelledby="tab-label-actions"
51
- >
52
- <ul class="listing">
53
- {% for item in menu_items %}
54
- <li class="row row-flush">
55
- <div class="col6">
56
- <a href="{{ item.url }}" class="button button-primary">{{ item.label }}</a>
57
- </div>
58
- <small class="col6">{{ item.help_text }}</small>
59
- </li>
60
- {% endfor %}
61
- </ul>
62
- </section>
63
- {% endif %}
64
- </div>
65
- </form>
56
+ </ul>
57
+ </section>
58
+ {% endif %}
59
+ </div>
66
60
  </div>
67
-
68
- {% endblock %}
69
-
70
- {% block extra_css %}
71
- {{ block.super }}
72
- {{ media.css }}
73
- {% endblock %}
74
- {% block extra_js %}
75
- {{ block.super }}
76
- {% include "wagtailadmin/pages/_editor_js.html" %}
77
- {{ media.js }}
78
61
  {% endblock %}
@@ -14,34 +14,6 @@
14
14
  {% endblock %}
15
15
 
16
16
  {% block js %}
17
- <script>
18
- (function(document, window) {
19
- window.wagtailConfig = window.wagtailConfig || {};
20
- wagtailConfig.ADMIN_API = {
21
- PAGES: '{% url "wagtailadmin_api:pages:listing" %}',
22
- DOCUMENTS: '{% url "wagtailadmin_api:documents:listing" %}',
23
- IMAGES: '{% url "wagtailadmin_api:images:listing" %}',
24
- {# // Use this to add an extra query string on all API requests. #}
25
- {# // Example value: '&order=-id' #}
26
- EXTRA_CHILDREN_PARAMETERS: '',
27
- };
28
-
29
- {% i18n_enabled as i18n_enabled %}
30
- {% locales as locales %}
31
- wagtailConfig.I18N_ENABLED = {% if i18n_enabled %}true{% else %}false{% endif %};
32
- wagtailConfig.LOCALES = {{ locales|safe }};
33
-
34
- {% if locale %}
35
- wagtailConfig.ACTIVE_CONTENT_LOCALE = '{{ locale.language_code }}'
36
- {% endif %}
37
-
38
- wagtailConfig.STRINGS = {% js_translation_strings %};
39
-
40
- wagtailConfig.ADMIN_URLS = {
41
- PAGES: '{% url "wagtailadmin_explore_root" %}'
42
- };
43
- })(document, window);
44
- </script>
45
17
  {% wagtail_config as config %}
46
18
  {{ config|json_script:"wagtail-config" }}
47
19
  <script src="{% versioned_static 'wagtailadmin/js/vendor/jquery-3.6.0.min.js' %}"></script>
@@ -1,5 +1,5 @@
1
1
  {% load i18n wagtailadmin_tags %}
2
- <section class="footer bulk-actions-choices hidden" data-bulk-action-footer aria-labelledby="bulk-actions-heading">
2
+ <section class="footer bulk-actions-choices hidden" data-bulk-action-footer="{% if item_type %}{{ item_type }}{% else %}{{ model_name|upper }}{% endif %}" aria-labelledby="bulk-actions-heading">
3
3
  <h2 id="bulk-actions-heading" class="w-sr-only">{% trans "Bulk actions" %}</h2>
4
4
  <div class="footer__container">
5
5
  {% include 'wagtailadmin/bulk_actions/select_all_checkbox_input.html' with parent=parent %}
@@ -1,11 +1,13 @@
1
1
  {% load i18n wagtailadmin_tags %}
2
2
 
3
3
  <h2 role="alert">
4
- {% blocktrans trimmed count counter=pages.paginator.count %}
5
- There is {{ counter }} match
6
- {% plural %}
7
- There are {{ counter }} matches
8
- {% endblocktrans %}
4
+ {% with counter_val=pages.paginator.count %}
5
+ {% blocktrans trimmed with counter=counter_val|intcomma count counter_val=counter_val %}
6
+ There is {{ counter }} match
7
+ {% plural %}
8
+ There are {{ counter }} matches
9
+ {% endblocktrans %}
10
+ {% endwith %}
9
11
  </h2>
10
12
 
11
13
  {% if pages %}
@@ -1,6 +1,6 @@
1
1
  {% load i18n wagtailadmin_tags %}
2
2
  <td class="{% if value.can_descend %}children{% endif %} {% if column.classname %}{{ column.classname }}{% endif %}">
3
3
  {% if value.can_descend %}
4
- <a href="{% url 'wagtailadmin_choose_page_child' value.id %}{% querystring p=None %}" class="navigate-pages" title="{% blocktrans trimmed with title=value.get_admin_display_title %}Explore subpages of '{{ title }}'{% endblocktrans %}" arial-label="{% trans 'Explore' %}">{% icon name="arrow-right" classname="default" %}</a>
4
+ <a href="{% url 'wagtailadmin_choose_page_child' value.id %}{% querystring p=None %}" class="navigate-pages" title="{% blocktrans trimmed with title=value.get_admin_display_title %}Explore subpages of '{{ title }}'{% endblocktrans %}" aria-label="{% trans 'Explore' %}">{% icon name="arrow-right" classname="default" %}</a>
5
5
  {% endif %}
6
6
  </td>
@@ -4,11 +4,13 @@
4
4
  {% if is_searching %}
5
5
  {% block search_results_count %}
6
6
  <h2 role="alert">
7
- {% blocktrans trimmed count counter=results.paginator.count %}
8
- There is {{ counter }} match
9
- {% plural %}
10
- There are {{ counter }} matches
11
- {% endblocktrans %}
7
+ {% with result_count=results.paginator.count %}
8
+ {% blocktrans trimmed with counter=result_count|intcomma count counter_val=result_count %}
9
+ There is {{ counter }} match
10
+ {% plural %}
11
+ There are {{ counter }} matches
12
+ {% endblocktrans %}
13
+ {% endwith %}
12
14
  </h2>
13
15
  {% endblock %}
14
16
  {% else %}
@@ -1,9 +1 @@
1
1
  {% extends "wagtailadmin/generic/form.html" %}
2
- {% load i18n %}
3
-
4
- {% block actions %}
5
- {{ block.super }}
6
- {% if delete_url %}
7
- <a href="{{ delete_url }}" class="button no">{{ delete_item_label }}</a>
8
- {% endif %}
9
- {% endblock %}
@@ -17,27 +17,70 @@
17
17
 
18
18
  {% block main_content %}
19
19
  {% block before_form %}{% endblock %}
20
- <form action="{{ action_url }}" method="POST" novalidate{% if form.is_multipart %} enctype="multipart/form-data"{% endif %} data-edit-form>
20
+ <form
21
+ id="w-editor-form"
22
+ action="{{ action_url }}"
23
+ method="POST"
24
+ novalidate
25
+ {% if form.is_multipart %} enctype="multipart/form-data"{% endif %}
26
+ data-edit-form
27
+ data-controller="w-unsaved"
28
+ data-action="w-unsaved#submit beforeunload@window->w-unsaved#confirm change->w-unsaved#check keyup->w-unsaved#check"
29
+ data-w-unsaved-confirmation-value="true"
30
+ data-w-unsaved-force-value="{{ has_unsaved_changes|yesno:'true,false' }}"
31
+ data-w-unsaved-watch-value="edits"
32
+ >
21
33
  {% csrf_token %}
22
34
 
23
- {% if panel %}
24
- {{ panel.render_form_content }}
25
- {% else %}
26
- {% block hidden_fields %}
27
- {% for field in form.hidden_fields %}{{ field }}{% endfor %}
28
- {% endblock %}
29
-
30
- <ul class="fields">
31
- {% block visible_fields %}
32
- {% for field in form.visible_fields %}
33
- <li>{% formattedfield field %}</li>
34
- {% endfor %}
35
+ {% block form_content %}
36
+ {% if panel %}
37
+ {{ panel.render_form_content }}
38
+ {% else %}
39
+ {% block hidden_fields %}
40
+ {% for field in form.hidden_fields %}{{ field }}{% endfor %}
35
41
  {% endblock %}
36
- </ul>
37
- {% endif %}
38
42
 
39
- {% block actions %}
40
- <button type="submit" class="button">{{ submit_button_label }}</button>
43
+ <ul class="fields">
44
+ {% block visible_fields %}
45
+ {% for field in form.visible_fields %}
46
+ <li>{% formattedfield field %}</li>
47
+ {% endfor %}
48
+ {% endblock %}
49
+ </ul>
50
+ {% endif %}
51
+ {% endblock %}
52
+
53
+ {% block footer %}
54
+ <footer class="footer w-grid md:w-grid-flow-col">
55
+ <nav class="actions actions--primary footer__container" aria-label="{% trans 'Actions' %}">
56
+ {% block actions %}
57
+ {% fragment as main_action %}
58
+ {% block main_action %}
59
+ <button
60
+ type="submit"
61
+ class="button button-longrunning"
62
+ data-controller="w-progress w-kbd"
63
+ data-action="w-progress#activate"
64
+ data-w-kbd-key-value="mod+s"
65
+ data-w-kbd-scope-value="global"
66
+ data-w-progress-active-value="{{ submit_button_active_label }}"
67
+ >
68
+ {% icon name="spinner" %}
69
+ <em data-w-progress-target="label">{{ submit_button_label }}</em>
70
+ </button>
71
+ {% endblock %}
72
+ {% endfragment %}
73
+
74
+ {% fragment stripped as extra_actions %}{% block extra_actions %}{% endblock %}{% endfragment %}
75
+
76
+ {% include "wagtailadmin/shared/action_menu/menu.html" with show_menu=extra_actions default_menu_item=main_action menu_items_fragment=extra_actions %}
77
+
78
+ {% endblock %}
79
+ </nav>
80
+ {% block unsaved_changes_warning %}
81
+ {% include "wagtailadmin/shared/unsaved_changes_warning.html" %}
82
+ {% endblock%}
83
+ </footer>
41
84
  {% endblock %}
42
85
  </form>
43
86
  {% endblock %}
@@ -13,3 +13,20 @@
13
13
  {% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label action_icon=header_action_icon extra_actions=extra_actions icon=header_icon search_url=search_url search_form=search_form search_results_url=index_results_url only %}
14
14
  {% endif %}
15
15
  {% endblock %}
16
+
17
+ {% block listing %}
18
+ {% comment %}
19
+ DEPRECATED: This block override is for supporting views that have filters
20
+ but not using breadcrumbs (thus have no slim_header to put the filters in).
21
+ There is no longer such a view in Wagtail core, but we keep this block
22
+ until we can enforce the use of breadcrumbs in all listing views.
23
+ {% endcomment %}
24
+ {% if filters and not breadcrumbs_items %}
25
+ <div class="filterable">
26
+ {{ block.super }}
27
+ {% include "wagtailadmin/shared/filters.html" %}
28
+ </div>
29
+ {% else %}
30
+ {{ block.super }}
31
+ {% endif %}
32
+ {% endblock %}
@@ -1,47 +1,21 @@
1
1
  {% extends "wagtailadmin/generic/listing_results.html" %}
2
2
  {% load i18n wagtailadmin_tags %}
3
3
 
4
- {% block before_results %}
5
- {{ block.super }}
6
-
4
+ {% block other_searches %}
7
5
  {% if is_searching and view.show_other_searches %}
8
6
  <div class="nice-padding">
9
7
  {% search_other %}
10
8
  </div>
11
9
  {% endif %}
12
-
13
- {% if not object_list %}
14
- {# pass, to allow the same logic as `if object_list and (is_searching or is_filtering)` #}
15
- {% elif is_searching or is_filtering %}
16
- <div class="nice-padding">
17
- <h2 role="alert">
18
- {% blocktrans trimmed count counter=items_count %}
19
- There is {{ counter }} match
20
- {% plural %}
21
- There are {{ counter }} matches
22
- {% endblocktrans %}
23
- </h2>
24
- </div>
25
- {% endif %}
26
10
  {% endblock %}
27
11
 
28
12
  {% block no_results_message %}
29
- {% fragment as no_results_message %}
30
- {% if is_searching or is_filtering %}
31
- {% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
32
- No {{ model_name }} match your query.
33
- {% endblocktrans %}
34
- {% elif add_url %}
35
- {% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
36
- There are no {{ model_name }} to display. Why not <a href="{{ add_url }}">add one</a>?
37
- {% endblocktrans %}
38
- {% else %}
39
- {% blocktrans trimmed with model_name=model_opts.verbose_name_plural asvar no_results_text %}
40
- There are no {{ model_name }} to display.
41
- {% endblocktrans %}
42
- {% endif %}
43
- {{ no_results_text|capfirst }}
44
- {% endfragment %}
45
-
46
- <p>{{ no_results_message }}</p>
13
+ {% if add_url and not is_searching and not is_filtering %}
14
+ {% blocktrans trimmed with model_name=verbose_name_plural asvar no_results_text %}
15
+ There are no {{ model_name }} to display. Why not <a href="{{ add_url }}">add one</a>?
16
+ {% endblocktrans %}
17
+ <p>{{ no_results_text|capfirst }}</p>
18
+ {% else %}
19
+ {{ block.super }}
20
+ {% endif %}
47
21
  {% endblock %}
@@ -1,5 +1,5 @@
1
1
  {% extends "wagtailadmin/generic/base.html" %}
2
- {% load i18n wagtailadmin_tags %}
2
+ {% load i18n wagtailadmin_tags l10n %}
3
3
 
4
4
  {% block main_content %}
5
5
  {% block fields_output %}
@@ -11,7 +11,7 @@
11
11
  {% if field.component %}
12
12
  {% component field.component %}
13
13
  {% else %}
14
- {{ field.value }}
14
+ {{ field.value|localize }}
15
15
  {% endif %}
16
16
  </dd>
17
17
  {% endfor %}
@@ -19,22 +19,3 @@
19
19
  {% endif %}
20
20
  {% endblock %}
21
21
  {% endblock %}
22
-
23
- {% block content %}
24
- {{ block.super }}
25
-
26
- {% block footer %}
27
- {% if edit_url or delete_url %}
28
- <footer class="footer">
29
- <div class="footer__container">
30
- {% if edit_url %}
31
- <a href="{{ edit_url }}" class="button">{% trans 'Edit' %}</a>
32
- {% endif %}
33
- {% if delete_url %}
34
- <a href="{{ delete_url }}" class="button serious">{% trans 'Delete' %}</a>
35
- {% endif %}
36
- </div>
37
- </footer>
38
- {% endif %}
39
- {% endblock %}
40
- {% endblock %}
@@ -1,29 +1,23 @@
1
1
  {% extends "wagtailadmin/generic/base.html" %}
2
2
  {% load i18n %}
3
3
 
4
- {% block main_header %}
5
- {% if not breadcrumbs_items %}
6
- {% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label icon=header_icon only %}
7
- {% endif %}
8
- {% endblock %}
9
-
10
4
  {% block content %}
5
+ {% comment %}
6
+ Override the content block instead of main_content so we get the full-width layout without the nice-padding.
7
+ However, this means we need to include the header block again (and only do {{ block.super }} inside it).
8
+ {% endcomment %}
9
+
11
10
  {% block header %}
12
11
  {{ block.super }}
13
12
  {% endblock %}
14
13
 
15
14
  {% block listing %}
16
- <div class="{% if filters and not breadcrumbs_items %}filterable{% endif %}">
17
- <div id="listing-results">
18
- {% comment %}
19
- This div will be replaced on AJAX refreshes.
20
- Do not add page furniture here unless you intend it to disappear on AJAX refresh
21
- {% endcomment %}
22
- {% include view.results_template_name|default:"wagtailadmin/generic/listing_results.html" %}
23
- </div>
24
- {% if filters and not breadcrumbs_items %}
25
- {% include "wagtailadmin/shared/filters.html" %}
26
- {% endif %}
15
+ <div id="listing-results">
16
+ {% comment %}
17
+ This div will be replaced on AJAX refreshes.
18
+ Do not add page furniture here unless you intend it to disappear on AJAX refresh
19
+ {% endcomment %}
20
+ {% include view.results_template_name|default:"wagtailadmin/generic/listing_results.html" %}
27
21
  </div>
28
22
  {% endblock %}
29
23
 
@@ -18,6 +18,22 @@
18
18
  {% endfor %}
19
19
  </template>
20
20
  {% endif %}
21
+
22
+ {% block other_searches %}{% endblock %}
23
+
24
+ {% if not object_list %}
25
+ {# pass, to allow the same logic as `if object_list and (is_searching or is_filtering)` #}
26
+ {% elif is_searching or is_filtering %}
27
+ <div class="nice-padding">
28
+ <h2 role="alert">
29
+ {% blocktrans trimmed with counter=items_count|intcomma count counter_val=items_count %}
30
+ There is {{ counter }} match
31
+ {% plural %}
32
+ There are {{ counter }} matches
33
+ {% endblocktrans %}
34
+ </h2>
35
+ </div>
36
+ {% endif %}
21
37
  {% endblock %}
22
38
 
23
39
  {% if object_list %}
@@ -33,6 +49,8 @@
33
49
  {% endblock %}
34
50
  {% else %}
35
51
  <div class="nice-padding w-mt-8">
36
- {% block no_results_message %}<p>{% trans "There are no results." %}</p>{% endblock %}
52
+ {% block no_results_message %}
53
+ <p>{{ no_results_message|capfirst }}</p>
54
+ {% endblock %}
37
55
  </div>
38
56
  {% endif %}
@@ -0,0 +1,26 @@
1
+ {% load wagtailadmin_tags wagtailcore_tags i18n %}
2
+ <div class="w-hidden lg:w-flex w-gap-5 w-pt-4 w-mb-[3.5rem] w-px-[3.75rem] w-border-l w-border-border-furniture">
3
+ {% avatar user size="large" edit_link=True %}
4
+ <div>
5
+ <h2 class="w-label-1 w-mt-0 w-mb-1">{{ user|user_display_name }}</h2>
6
+ <ul class="w-list-none w-p-0 w-m-0 w-flex w-flex-col w-gap-1">
7
+ <li>
8
+ <a class="w-underline w-underline-offset-[3px]"
9
+ href="{% url 'wagtailadmin_account' %}">{% trans 'Account' %}</a>
10
+ </li>
11
+ {% wagtail_feature_release_editor_guide_link as editor_guide_link %}
12
+ {% wagtail_version as current_version %}
13
+ <li>
14
+ <a class="w-underline w-underline-offset-[3px] w-flex w-items-center w-gap-1"
15
+ href="{{ editor_guide_link }}"
16
+ target="_blank"
17
+ rel="noreferrer">
18
+ {% blocktrans trimmed %}
19
+ Wagtail {{ current_version }} editor guide
20
+ {% endblocktrans %}
21
+ {% icon name="link-external" classname="initial" %}
22
+ </a>
23
+ </li>
24
+ </ul>
25
+ </div>
26
+ </div>