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.
Files changed (1238) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
  3. wagtail/admin/locale/ar/LC_MESSAGES/django.po +44 -89
  4. wagtail/admin/locale/az_AZ/LC_MESSAGES/django.mo +0 -0
  5. wagtail/admin/locale/az_AZ/LC_MESSAGES/django.po +4 -7
  6. wagtail/admin/locale/be/LC_MESSAGES/django.mo +0 -0
  7. wagtail/admin/locale/be/LC_MESSAGES/django.po +15 -42
  8. wagtail/admin/locale/bg/LC_MESSAGES/django.mo +0 -0
  9. wagtail/admin/locale/bg/LC_MESSAGES/django.po +7 -16
  10. wagtail/admin/locale/bn/LC_MESSAGES/django.mo +0 -0
  11. wagtail/admin/locale/bn/LC_MESSAGES/django.po +4 -13
  12. wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
  13. wagtail/admin/locale/ca/LC_MESSAGES/django.po +159 -74
  14. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
  15. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.po +11 -0
  16. wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
  17. wagtail/admin/locale/cs/LC_MESSAGES/django.po +17 -51
  18. wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
  19. wagtail/admin/locale/cy/LC_MESSAGES/django.po +6 -13
  20. wagtail/admin/locale/da/LC_MESSAGES/django.mo +0 -0
  21. wagtail/admin/locale/da/LC_MESSAGES/django.po +10 -22
  22. wagtail/admin/locale/de/LC_MESSAGES/django.mo +0 -0
  23. wagtail/admin/locale/de/LC_MESSAGES/django.po +42 -93
  24. wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
  25. wagtail/admin/locale/dv/LC_MESSAGES/django.po +26 -64
  26. wagtail/admin/locale/el/LC_MESSAGES/django.mo +0 -0
  27. wagtail/admin/locale/el/LC_MESSAGES/django.po +9 -31
  28. wagtail/admin/locale/es/LC_MESSAGES/django.mo +0 -0
  29. wagtail/admin/locale/es/LC_MESSAGES/django.po +17 -52
  30. wagtail/admin/locale/es_419/LC_MESSAGES/django.mo +0 -0
  31. wagtail/admin/locale/es_419/LC_MESSAGES/django.po +4 -22
  32. wagtail/admin/locale/es_VE/LC_MESSAGES/django.mo +0 -0
  33. wagtail/admin/locale/es_VE/LC_MESSAGES/django.po +4 -7
  34. wagtail/admin/locale/et/LC_MESSAGES/django.mo +0 -0
  35. wagtail/admin/locale/et/LC_MESSAGES/django.po +15 -42
  36. wagtail/admin/locale/eu/LC_MESSAGES/django.po +1 -1
  37. wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
  38. wagtail/admin/locale/fa/LC_MESSAGES/django.po +12 -50
  39. wagtail/admin/locale/fi/LC_MESSAGES/django.mo +0 -0
  40. wagtail/admin/locale/fi/LC_MESSAGES/django.po +43 -70
  41. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.mo +0 -0
  42. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.po +17 -0
  43. wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
  44. wagtail/admin/locale/fr/LC_MESSAGES/django.po +157 -74
  45. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
  46. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.po +11 -0
  47. wagtail/admin/locale/gl/LC_MESSAGES/django.mo +0 -0
  48. wagtail/admin/locale/gl/LC_MESSAGES/django.po +155 -72
  49. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
  50. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +11 -0
  51. wagtail/admin/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  52. wagtail/admin/locale/he_IL/LC_MESSAGES/django.po +7 -28
  53. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  54. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.po +15 -38
  55. wagtail/admin/locale/ht/LC_MESSAGES/django.po +4 -4
  56. wagtail/admin/locale/hu/LC_MESSAGES/django.mo +0 -0
  57. wagtail/admin/locale/hu/LC_MESSAGES/django.po +44 -91
  58. wagtail/admin/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  59. wagtail/admin/locale/id_ID/LC_MESSAGES/django.po +10 -31
  60. wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  61. wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +172 -68
  62. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.mo +0 -0
  63. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.po +8 -2
  64. wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
  65. wagtail/admin/locale/it/LC_MESSAGES/django.po +31 -76
  66. wagtail/admin/locale/ja/LC_MESSAGES/django.mo +0 -0
  67. wagtail/admin/locale/ja/LC_MESSAGES/django.po +15 -42
  68. wagtail/admin/locale/ka/LC_MESSAGES/django.po +4 -4
  69. wagtail/admin/locale/ko/LC_MESSAGES/django.mo +0 -0
  70. wagtail/admin/locale/ko/LC_MESSAGES/django.po +20 -57
  71. wagtail/admin/locale/lt/LC_MESSAGES/django.mo +0 -0
  72. wagtail/admin/locale/lt/LC_MESSAGES/django.po +12 -31
  73. wagtail/admin/locale/lv/LC_MESSAGES/django.mo +0 -0
  74. wagtail/admin/locale/lv/LC_MESSAGES/django.po +9 -40
  75. wagtail/admin/locale/mi/LC_MESSAGES/django.mo +0 -0
  76. wagtail/admin/locale/mi/LC_MESSAGES/django.po +6 -10
  77. wagtail/admin/locale/mn/LC_MESSAGES/django.mo +0 -0
  78. wagtail/admin/locale/mn/LC_MESSAGES/django.po +10 -43
  79. wagtail/admin/locale/my/LC_MESSAGES/django.po +4 -4
  80. wagtail/admin/locale/nb/LC_MESSAGES/django.mo +0 -0
  81. wagtail/admin/locale/nb/LC_MESSAGES/django.po +15 -53
  82. wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
  83. wagtail/admin/locale/nl/LC_MESSAGES/django.po +157 -73
  84. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
  85. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +11 -0
  86. wagtail/admin/locale/pl/LC_MESSAGES/django.mo +0 -0
  87. wagtail/admin/locale/pl/LC_MESSAGES/django.po +27 -72
  88. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  89. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +38 -83
  90. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  91. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.po +17 -56
  92. wagtail/admin/locale/ro/LC_MESSAGES/django.mo +0 -0
  93. wagtail/admin/locale/ro/LC_MESSAGES/django.po +23 -68
  94. wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
  95. wagtail/admin/locale/ru/LC_MESSAGES/django.po +44 -89
  96. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  97. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +9 -28
  98. wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
  99. wagtail/admin/locale/sl/LC_MESSAGES/django.po +45 -90
  100. wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
  101. wagtail/admin/locale/sv/LC_MESSAGES/django.po +27 -72
  102. wagtail/admin/locale/tet/LC_MESSAGES/django.mo +0 -0
  103. wagtail/admin/locale/tet/LC_MESSAGES/django.po +12 -22
  104. wagtail/admin/locale/th/LC_MESSAGES/django.mo +0 -0
  105. wagtail/admin/locale/th/LC_MESSAGES/django.po +10 -42
  106. wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
  107. wagtail/admin/locale/tr/LC_MESSAGES/django.po +61 -68
  108. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  109. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.po +15 -42
  110. wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
  111. wagtail/admin/locale/ug/LC_MESSAGES/django.po +38 -83
  112. wagtail/admin/locale/uk/LC_MESSAGES/django.mo +0 -0
  113. wagtail/admin/locale/uk/LC_MESSAGES/django.po +15 -45
  114. wagtail/admin/locale/vi/LC_MESSAGES/django.mo +0 -0
  115. wagtail/admin/locale/vi/LC_MESSAGES/django.po +4 -17
  116. wagtail/admin/locale/zh/LC_MESSAGES/django.mo +0 -0
  117. wagtail/admin/locale/zh/LC_MESSAGES/django.po +7 -19
  118. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  119. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +17 -54
  120. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  121. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.po +15 -37
  122. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  123. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  124. wagtail/admin/templates/wagtailadmin/base.html +1 -1
  125. wagtail/admin/templatetags/wagtailadmin_tags.py +13 -1
  126. wagtail/admin/tests/pages/test_create_page.py +8 -0
  127. wagtail/admin/tests/pages/test_preview.py +111 -0
  128. wagtail/admin/views/generic/preview.py +8 -1
  129. wagtail/admin/views/pages/preview.py +10 -1
  130. wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po +1 -1
  131. wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.po +1 -1
  132. wagtail/contrib/forms/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  133. wagtail/contrib/forms/locale/be/LC_MESSAGES/django.po +1 -1
  134. wagtail/contrib/forms/locale/bg/LC_MESSAGES/django.po +1 -1
  135. wagtail/contrib/forms/locale/bn/LC_MESSAGES/django.po +1 -1
  136. wagtail/contrib/forms/locale/ca/LC_MESSAGES/django.po +1 -1
  137. wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.po +1 -1
  138. wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +1 -1
  139. wagtail/contrib/forms/locale/da/LC_MESSAGES/django.po +1 -1
  140. wagtail/contrib/forms/locale/de/LC_MESSAGES/django.po +1 -1
  141. wagtail/contrib/forms/locale/dv/LC_MESSAGES/django.po +1 -1
  142. wagtail/contrib/forms/locale/el/LC_MESSAGES/django.po +1 -1
  143. wagtail/contrib/forms/locale/es/LC_MESSAGES/django.po +1 -1
  144. wagtail/contrib/forms/locale/es_419/LC_MESSAGES/django.po +1 -1
  145. wagtail/contrib/forms/locale/et/LC_MESSAGES/django.po +1 -1
  146. wagtail/contrib/forms/locale/eu/LC_MESSAGES/django.po +1 -1
  147. wagtail/contrib/forms/locale/fa/LC_MESSAGES/django.po +1 -1
  148. wagtail/contrib/forms/locale/fi/LC_MESSAGES/django.po +1 -1
  149. wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.po +1 -1
  150. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +1 -1
  151. wagtail/contrib/forms/locale/he_IL/LC_MESSAGES/django.po +1 -1
  152. wagtail/contrib/forms/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  153. wagtail/contrib/forms/locale/ht/LC_MESSAGES/django.po +1 -1
  154. wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.po +1 -1
  155. wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.po +1 -1
  156. wagtail/contrib/forms/locale/id_ID/LC_MESSAGES/django.po +1 -1
  157. wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.po +1 -1
  158. wagtail/contrib/forms/locale/it/LC_MESSAGES/django.po +1 -1
  159. wagtail/contrib/forms/locale/ja/LC_MESSAGES/django.po +1 -1
  160. wagtail/contrib/forms/locale/ka/LC_MESSAGES/django.po +1 -1
  161. wagtail/contrib/forms/locale/ko/LC_MESSAGES/django.po +1 -1
  162. wagtail/contrib/forms/locale/lt/LC_MESSAGES/django.po +1 -1
  163. wagtail/contrib/forms/locale/lv/LC_MESSAGES/django.po +1 -1
  164. wagtail/contrib/forms/locale/mi/LC_MESSAGES/django.po +1 -1
  165. wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.po +1 -1
  166. wagtail/contrib/forms/locale/my/LC_MESSAGES/django.po +1 -1
  167. wagtail/contrib/forms/locale/nb/LC_MESSAGES/django.po +1 -1
  168. wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +1 -1
  169. wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.po +1 -1
  170. wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  171. wagtail/contrib/forms/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  172. wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.po +1 -1
  173. wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +1 -1
  174. wagtail/contrib/forms/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  175. wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.po +1 -1
  176. wagtail/contrib/forms/locale/sv/LC_MESSAGES/django.po +1 -1
  177. wagtail/contrib/forms/locale/tet/LC_MESSAGES/django.po +1 -1
  178. wagtail/contrib/forms/locale/th/LC_MESSAGES/django.po +1 -1
  179. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.mo +0 -0
  180. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +12 -2
  181. wagtail/contrib/forms/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  182. wagtail/contrib/forms/locale/ug/LC_MESSAGES/django.po +1 -1
  183. wagtail/contrib/forms/locale/uk/LC_MESSAGES/django.po +1 -1
  184. wagtail/contrib/forms/locale/vi/LC_MESSAGES/django.po +1 -1
  185. wagtail/contrib/forms/locale/zh/LC_MESSAGES/django.po +1 -1
  186. wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  187. wagtail/contrib/forms/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  188. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
  189. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +1 -13
  190. wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +1 -1
  191. wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +1 -1
  192. wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
  193. wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.mo +0 -0
  194. wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +9 -10
  195. wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.mo +0 -0
  196. wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +1 -13
  197. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.mo +0 -0
  198. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +1 -13
  199. wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
  200. wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.mo +0 -0
  201. wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +1 -13
  202. wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +1 -1
  203. wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +1 -1
  204. wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
  205. wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.mo +0 -0
  206. wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +1 -14
  207. wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
  208. wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
  209. wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.mo +0 -0
  210. wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +1 -13
  211. wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
  212. wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +1 -1
  213. wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.mo +0 -0
  214. wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +7 -11
  215. wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.mo +0 -0
  216. wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +9 -8
  217. wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.mo +0 -0
  218. wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +9 -9
  219. wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
  220. wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
  221. wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  222. wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +1 -13
  223. wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
  224. wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.mo +0 -0
  225. wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +1 -13
  226. wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
  227. wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +1 -1
  228. wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  229. wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +10 -9
  230. wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.mo +0 -0
  231. wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +1 -14
  232. wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.mo +0 -0
  233. wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +1 -13
  234. wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
  235. wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +1 -1
  236. wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +1 -1
  237. wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
  238. wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
  239. wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +1 -1
  240. wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
  241. wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.mo +0 -0
  242. wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +1 -13
  243. wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.mo +0 -0
  244. wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +9 -9
  245. wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.mo +0 -0
  246. wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +1 -14
  247. wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  248. wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +1 -13
  249. wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  250. wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +1 -13
  251. wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.mo +0 -0
  252. wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +1 -13
  253. wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.mo +0 -0
  254. wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +1 -13
  255. wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  256. wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.mo +0 -0
  257. wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +1 -14
  258. wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +1 -1
  259. wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.mo +0 -0
  260. wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +1 -13
  261. wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
  262. wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +1 -1
  263. wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +1 -1
  264. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.mo +0 -0
  265. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +1 -13
  266. wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  267. wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.mo +0 -0
  268. wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.po +1 -13
  269. wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.mo +0 -0
  270. wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +1 -13
  271. wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
  272. wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +1 -1
  273. wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  274. wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +1 -13
  275. wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  276. wagtail/contrib/search_promotions/locale/af/LC_MESSAGES/django.po +1 -1
  277. wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.mo +0 -0
  278. wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.po +1 -7
  279. wagtail/contrib/search_promotions/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  280. wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.mo +0 -0
  281. wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.po +1 -7
  282. wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.po +1 -1
  283. wagtail/contrib/search_promotions/locale/bn/LC_MESSAGES/django.po +1 -1
  284. wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.mo +0 -0
  285. wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.po +5 -5
  286. wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.mo +0 -0
  287. wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.po +1 -7
  288. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.mo +0 -0
  289. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +1 -7
  290. wagtail/contrib/search_promotions/locale/da/LC_MESSAGES/django.po +1 -1
  291. wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.mo +0 -0
  292. wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.po +1 -7
  293. wagtail/contrib/search_promotions/locale/dv/LC_MESSAGES/django.po +1 -1
  294. wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.mo +0 -0
  295. wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.po +1 -7
  296. wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.mo +0 -0
  297. wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.po +1 -7
  298. wagtail/contrib/search_promotions/locale/es_419/LC_MESSAGES/django.po +1 -1
  299. wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.mo +0 -0
  300. wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.po +1 -7
  301. wagtail/contrib/search_promotions/locale/eu/LC_MESSAGES/django.po +1 -1
  302. wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.mo +0 -0
  303. wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.po +1 -7
  304. wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.mo +0 -0
  305. wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.po +1 -7
  306. wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.mo +0 -0
  307. wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +5 -5
  308. wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.mo +0 -0
  309. wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.po +5 -5
  310. wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  311. wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.po +1 -7
  312. wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  313. wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.po +1 -7
  314. wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.po +1 -1
  315. wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.mo +0 -0
  316. wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.po +1 -7
  317. wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  318. wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.po +1 -7
  319. wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  320. wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +8 -7
  321. wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.mo +0 -0
  322. wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.po +1 -7
  323. wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.mo +0 -0
  324. wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.po +1 -7
  325. wagtail/contrib/search_promotions/locale/ka/LC_MESSAGES/django.po +1 -1
  326. wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.mo +0 -0
  327. wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.po +1 -7
  328. wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.mo +0 -0
  329. wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.po +1 -7
  330. wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.mo +0 -0
  331. wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.po +1 -7
  332. wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.po +1 -1
  333. wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.po +1 -1
  334. wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.po +1 -1
  335. wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.mo +0 -0
  336. wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.po +1 -7
  337. wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.mo +0 -0
  338. wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.po +4 -4
  339. wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.mo +0 -0
  340. wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.po +1 -7
  341. wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  342. wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.po +1 -7
  343. wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  344. wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.po +1 -7
  345. wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.mo +0 -0
  346. wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.po +1 -7
  347. wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.mo +0 -0
  348. wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.po +1 -7
  349. wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  350. wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.po +1 -7
  351. wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.mo +0 -0
  352. wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +1 -7
  353. wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.mo +0 -0
  354. wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +1 -7
  355. wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.mo +0 -0
  356. wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.po +1 -7
  357. wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.mo +0 -0
  358. wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.po +1 -7
  359. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
  360. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +1 -7
  361. wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  362. wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.po +1 -7
  363. wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.mo +0 -0
  364. wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.po +1 -7
  365. wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.mo +0 -0
  366. wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.po +1 -7
  367. wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.po +1 -1
  368. wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.po +1 -1
  369. wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  370. wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.po +1 -7
  371. wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  372. wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.po +1 -7
  373. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +1 -1
  374. wagtail/contrib/settings/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  375. wagtail/contrib/settings/locale/be/LC_MESSAGES/django.po +1 -1
  376. wagtail/contrib/settings/locale/bn/LC_MESSAGES/django.po +1 -1
  377. wagtail/contrib/settings/locale/ca/LC_MESSAGES/django.po +1 -1
  378. wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +1 -1
  379. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +1 -1
  380. wagtail/contrib/settings/locale/da/LC_MESSAGES/django.po +1 -1
  381. wagtail/contrib/settings/locale/de/LC_MESSAGES/django.po +1 -1
  382. wagtail/contrib/settings/locale/dv/LC_MESSAGES/django.po +1 -1
  383. wagtail/contrib/settings/locale/el/LC_MESSAGES/django.po +1 -1
  384. wagtail/contrib/settings/locale/en_IN/LC_MESSAGES/django.po +1 -1
  385. wagtail/contrib/settings/locale/es/LC_MESSAGES/django.po +1 -1
  386. wagtail/contrib/settings/locale/es_419/LC_MESSAGES/django.po +1 -1
  387. wagtail/contrib/settings/locale/es_VE/LC_MESSAGES/django.po +1 -1
  388. wagtail/contrib/settings/locale/et/LC_MESSAGES/django.po +1 -1
  389. wagtail/contrib/settings/locale/fa/LC_MESSAGES/django.po +1 -1
  390. wagtail/contrib/settings/locale/fi/LC_MESSAGES/django.po +1 -1
  391. wagtail/contrib/settings/locale/fr/LC_MESSAGES/django.po +1 -1
  392. wagtail/contrib/settings/locale/gl/LC_MESSAGES/django.po +1 -1
  393. wagtail/contrib/settings/locale/he_IL/LC_MESSAGES/django.po +1 -1
  394. wagtail/contrib/settings/locale/hi/LC_MESSAGES/django.po +1 -1
  395. wagtail/contrib/settings/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  396. wagtail/contrib/settings/locale/ht/LC_MESSAGES/django.po +1 -1
  397. wagtail/contrib/settings/locale/hu/LC_MESSAGES/django.po +1 -1
  398. wagtail/contrib/settings/locale/id_ID/LC_MESSAGES/django.po +1 -1
  399. wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  400. wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.po +8 -3
  401. wagtail/contrib/settings/locale/it/LC_MESSAGES/django.po +1 -1
  402. wagtail/contrib/settings/locale/ja/LC_MESSAGES/django.po +1 -1
  403. wagtail/contrib/settings/locale/ka/LC_MESSAGES/django.po +1 -1
  404. wagtail/contrib/settings/locale/ko/LC_MESSAGES/django.po +1 -1
  405. wagtail/contrib/settings/locale/lt/LC_MESSAGES/django.po +1 -1
  406. wagtail/contrib/settings/locale/lv/LC_MESSAGES/django.po +1 -1
  407. wagtail/contrib/settings/locale/mi/LC_MESSAGES/django.po +1 -1
  408. wagtail/contrib/settings/locale/mn/LC_MESSAGES/django.po +1 -1
  409. wagtail/contrib/settings/locale/my/LC_MESSAGES/django.po +1 -1
  410. wagtail/contrib/settings/locale/nb/LC_MESSAGES/django.po +1 -1
  411. wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +1 -1
  412. wagtail/contrib/settings/locale/pl/LC_MESSAGES/django.po +1 -1
  413. wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  414. wagtail/contrib/settings/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  415. wagtail/contrib/settings/locale/ro/LC_MESSAGES/django.po +1 -1
  416. wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +1 -1
  417. wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  418. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.po +1 -1
  419. wagtail/contrib/settings/locale/sr/LC_MESSAGES/django.po +1 -1
  420. wagtail/contrib/settings/locale/sv/LC_MESSAGES/django.po +1 -1
  421. wagtail/contrib/settings/locale/ta/LC_MESSAGES/django.po +1 -1
  422. wagtail/contrib/settings/locale/tet/LC_MESSAGES/django.po +1 -1
  423. wagtail/contrib/settings/locale/th/LC_MESSAGES/django.po +1 -1
  424. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.po +1 -1
  425. wagtail/contrib/settings/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  426. wagtail/contrib/settings/locale/ug/LC_MESSAGES/django.po +1 -1
  427. wagtail/contrib/settings/locale/uk/LC_MESSAGES/django.po +1 -1
  428. wagtail/contrib/settings/locale/vi/LC_MESSAGES/django.po +1 -1
  429. wagtail/contrib/settings/locale/zh/LC_MESSAGES/django.po +1 -1
  430. wagtail/contrib/settings/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  431. wagtail/contrib/settings/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  432. wagtail/contrib/settings/tests/shared/test_preview.py +29 -0
  433. wagtail/contrib/settings/tests/site_specific/test_admin.py +8 -0
  434. wagtail/contrib/settings/views.py +8 -2
  435. wagtail/contrib/simple_translation/locale/ar/LC_MESSAGES/django.po +1 -1
  436. wagtail/contrib/simple_translation/locale/be/LC_MESSAGES/django.po +1 -1
  437. wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.po +1 -1
  438. wagtail/contrib/simple_translation/locale/cs/LC_MESSAGES/django.po +1 -1
  439. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +1 -1
  440. wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.po +1 -1
  441. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +1 -1
  442. wagtail/contrib/simple_translation/locale/el/LC_MESSAGES/django.po +1 -1
  443. wagtail/contrib/simple_translation/locale/es/LC_MESSAGES/django.po +1 -1
  444. wagtail/contrib/simple_translation/locale/es_419/LC_MESSAGES/django.po +1 -1
  445. wagtail/contrib/simple_translation/locale/fa/LC_MESSAGES/django.po +1 -1
  446. wagtail/contrib/simple_translation/locale/fi/LC_MESSAGES/django.po +1 -1
  447. wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.po +1 -1
  448. wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.po +1 -1
  449. wagtail/contrib/simple_translation/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  450. wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.po +1 -1
  451. wagtail/contrib/simple_translation/locale/is_IS/LC_MESSAGES/django.po +1 -1
  452. wagtail/contrib/simple_translation/locale/it/LC_MESSAGES/django.po +1 -1
  453. wagtail/contrib/simple_translation/locale/ko/LC_MESSAGES/django.po +1 -1
  454. wagtail/contrib/simple_translation/locale/lt/LC_MESSAGES/django.po +1 -1
  455. wagtail/contrib/simple_translation/locale/mi/LC_MESSAGES/django.po +1 -1
  456. wagtail/contrib/simple_translation/locale/mn/LC_MESSAGES/django.po +1 -1
  457. wagtail/contrib/simple_translation/locale/nb/LC_MESSAGES/django.po +1 -1
  458. wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.po +1 -1
  459. wagtail/contrib/simple_translation/locale/pl/LC_MESSAGES/django.po +1 -1
  460. wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  461. wagtail/contrib/simple_translation/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  462. wagtail/contrib/simple_translation/locale/ro/LC_MESSAGES/django.po +1 -1
  463. wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.po +1 -1
  464. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +1 -1
  465. wagtail/contrib/simple_translation/locale/sv/LC_MESSAGES/django.po +1 -1
  466. wagtail/contrib/simple_translation/locale/tr/LC_MESSAGES/django.po +1 -1
  467. wagtail/contrib/simple_translation/locale/ug/LC_MESSAGES/django.po +1 -1
  468. wagtail/contrib/simple_translation/locale/uk/LC_MESSAGES/django.po +1 -1
  469. wagtail/contrib/simple_translation/locale/vi/LC_MESSAGES/django.po +1 -1
  470. wagtail/contrib/simple_translation/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  471. wagtail/contrib/simple_translation/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  472. wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
  473. wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +1 -1
  474. wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  475. wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +1 -1
  476. wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
  477. wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
  478. wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
  479. wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
  480. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +1 -1
  481. wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
  482. wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
  483. wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +1 -1
  484. wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +1 -1
  485. wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
  486. wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
  487. wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
  488. wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
  489. wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
  490. wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
  491. wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
  492. wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
  493. wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
  494. wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
  495. wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
  496. wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  497. wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
  498. wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
  499. wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
  500. wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
  501. wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
  502. wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
  503. wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
  504. wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
  505. wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
  506. wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
  507. wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
  508. wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
  509. wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
  510. wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
  511. wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
  512. wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +1 -1
  513. wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  514. wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  515. wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
  516. wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +1 -1
  517. wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  518. wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +1 -1
  519. wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
  520. wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
  521. wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
  522. wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
  523. wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +1 -1
  524. wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  525. wagtail/contrib/styleguide/locale/ug/LC_MESSAGES/django.po +1 -1
  526. wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
  527. wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
  528. wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
  529. wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  530. wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  531. wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.po +1 -1
  532. wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.po +1 -1
  533. wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.mo +0 -0
  534. wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.po +6 -3
  535. wagtail/contrib/table_block/locale/cs/LC_MESSAGES/django.po +1 -1
  536. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  537. wagtail/contrib/table_block/locale/de/LC_MESSAGES/django.po +1 -1
  538. wagtail/contrib/table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  539. wagtail/contrib/table_block/locale/el/LC_MESSAGES/django.po +1 -1
  540. wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.po +1 -1
  541. wagtail/contrib/table_block/locale/es/LC_MESSAGES/django.po +1 -1
  542. wagtail/contrib/table_block/locale/et/LC_MESSAGES/django.po +1 -1
  543. wagtail/contrib/table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  544. wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  545. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
  546. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +6 -3
  547. wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.mo +0 -0
  548. wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.po +6 -3
  549. wagtail/contrib/table_block/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  550. wagtail/contrib/table_block/locale/ht/LC_MESSAGES/django.po +1 -1
  551. wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  552. wagtail/contrib/table_block/locale/id_ID/LC_MESSAGES/django.po +1 -1
  553. wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  554. wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.po +1 -1
  555. wagtail/contrib/table_block/locale/ja/LC_MESSAGES/django.po +1 -1
  556. wagtail/contrib/table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  557. wagtail/contrib/table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  558. wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.po +1 -1
  559. wagtail/contrib/table_block/locale/mi/LC_MESSAGES/django.po +1 -1
  560. wagtail/contrib/table_block/locale/mn/LC_MESSAGES/django.po +1 -1
  561. wagtail/contrib/table_block/locale/my/LC_MESSAGES/django.po +1 -1
  562. wagtail/contrib/table_block/locale/nb/LC_MESSAGES/django.po +1 -1
  563. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.mo +0 -0
  564. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.po +6 -3
  565. wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.po +1 -1
  566. wagtail/contrib/table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  567. wagtail/contrib/table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  568. wagtail/contrib/table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  569. wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.po +1 -1
  570. wagtail/contrib/table_block/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  571. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +1 -1
  572. wagtail/contrib/table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  573. wagtail/contrib/table_block/locale/tet/LC_MESSAGES/django.po +1 -1
  574. wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.po +1 -1
  575. wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.po +1 -1
  576. wagtail/contrib/table_block/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  577. wagtail/contrib/table_block/locale/ug/LC_MESSAGES/django.po +1 -1
  578. wagtail/contrib/table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  579. wagtail/contrib/table_block/locale/vi/LC_MESSAGES/django.po +1 -1
  580. wagtail/contrib/table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  581. wagtail/contrib/table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  582. wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.po +1 -1
  583. wagtail/contrib/typed_table_block/locale/be/LC_MESSAGES/django.po +1 -1
  584. wagtail/contrib/typed_table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  585. wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  586. wagtail/contrib/typed_table_block/locale/de/LC_MESSAGES/django.po +1 -1
  587. wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  588. wagtail/contrib/typed_table_block/locale/el/LC_MESSAGES/django.po +1 -1
  589. wagtail/contrib/typed_table_block/locale/es/LC_MESSAGES/django.po +1 -1
  590. wagtail/contrib/typed_table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  591. wagtail/contrib/typed_table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  592. wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +1 -1
  593. wagtail/contrib/typed_table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  594. wagtail/contrib/typed_table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  595. wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  596. wagtail/contrib/typed_table_block/locale/it/LC_MESSAGES/django.po +1 -1
  597. wagtail/contrib/typed_table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  598. wagtail/contrib/typed_table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  599. wagtail/contrib/typed_table_block/locale/nl/LC_MESSAGES/django.po +1 -1
  600. wagtail/contrib/typed_table_block/locale/pl/LC_MESSAGES/django.po +1 -1
  601. wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  602. wagtail/contrib/typed_table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  603. wagtail/contrib/typed_table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  604. wagtail/contrib/typed_table_block/locale/ru/LC_MESSAGES/django.po +1 -1
  605. wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +1 -1
  606. wagtail/contrib/typed_table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  607. wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.po +1 -1
  608. wagtail/contrib/typed_table_block/locale/tr/LC_MESSAGES/django.po +1 -1
  609. wagtail/contrib/typed_table_block/locale/ug/LC_MESSAGES/django.po +1 -1
  610. wagtail/contrib/typed_table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  611. wagtail/contrib/typed_table_block/locale/zh/LC_MESSAGES/django.po +1 -1
  612. wagtail/contrib/typed_table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  613. wagtail/contrib/typed_table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  614. wagtail/documents/forms.py +1 -1
  615. wagtail/documents/locale/af/LC_MESSAGES/django.po +1 -1
  616. wagtail/documents/locale/ar/LC_MESSAGES/django.mo +0 -0
  617. wagtail/documents/locale/ar/LC_MESSAGES/django.po +1 -5
  618. wagtail/documents/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  619. wagtail/documents/locale/be/LC_MESSAGES/django.mo +0 -0
  620. wagtail/documents/locale/be/LC_MESSAGES/django.po +1 -5
  621. wagtail/documents/locale/bg/LC_MESSAGES/django.po +1 -1
  622. wagtail/documents/locale/bn/LC_MESSAGES/django.po +1 -1
  623. wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
  624. wagtail/documents/locale/ca/LC_MESSAGES/django.po +5 -5
  625. wagtail/documents/locale/cs/LC_MESSAGES/django.mo +0 -0
  626. wagtail/documents/locale/cs/LC_MESSAGES/django.po +1 -7
  627. wagtail/documents/locale/cy/LC_MESSAGES/django.po +1 -1
  628. wagtail/documents/locale/da/LC_MESSAGES/django.po +1 -1
  629. wagtail/documents/locale/de/LC_MESSAGES/django.mo +0 -0
  630. wagtail/documents/locale/de/LC_MESSAGES/django.po +1 -7
  631. wagtail/documents/locale/dv/LC_MESSAGES/django.po +1 -1
  632. wagtail/documents/locale/el/LC_MESSAGES/django.mo +0 -0
  633. wagtail/documents/locale/el/LC_MESSAGES/django.po +1 -7
  634. wagtail/documents/locale/es/LC_MESSAGES/django.mo +0 -0
  635. wagtail/documents/locale/es/LC_MESSAGES/django.po +1 -7
  636. wagtail/documents/locale/es_419/LC_MESSAGES/django.po +1 -1
  637. wagtail/documents/locale/et/LC_MESSAGES/django.mo +0 -0
  638. wagtail/documents/locale/et/LC_MESSAGES/django.po +1 -5
  639. wagtail/documents/locale/eu/LC_MESSAGES/django.po +1 -1
  640. wagtail/documents/locale/fa/LC_MESSAGES/django.mo +0 -0
  641. wagtail/documents/locale/fa/LC_MESSAGES/django.po +1 -5
  642. wagtail/documents/locale/fi/LC_MESSAGES/django.mo +0 -0
  643. wagtail/documents/locale/fi/LC_MESSAGES/django.po +1 -5
  644. wagtail/documents/locale/fr/LC_MESSAGES/django.mo +0 -0
  645. wagtail/documents/locale/fr/LC_MESSAGES/django.po +5 -5
  646. wagtail/documents/locale/gl/LC_MESSAGES/django.mo +0 -0
  647. wagtail/documents/locale/gl/LC_MESSAGES/django.po +5 -5
  648. wagtail/documents/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  649. wagtail/documents/locale/he_IL/LC_MESSAGES/django.po +1 -5
  650. wagtail/documents/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  651. wagtail/documents/locale/hr_HR/LC_MESSAGES/django.po +1 -6
  652. wagtail/documents/locale/ht/LC_MESSAGES/django.po +1 -1
  653. wagtail/documents/locale/hu/LC_MESSAGES/django.mo +0 -0
  654. wagtail/documents/locale/hu/LC_MESSAGES/django.po +1 -7
  655. wagtail/documents/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  656. wagtail/documents/locale/id_ID/LC_MESSAGES/django.po +1 -6
  657. wagtail/documents/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  658. wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +14 -4
  659. wagtail/documents/locale/it/LC_MESSAGES/django.mo +0 -0
  660. wagtail/documents/locale/it/LC_MESSAGES/django.po +1 -5
  661. wagtail/documents/locale/ja/LC_MESSAGES/django.mo +0 -0
  662. wagtail/documents/locale/ja/LC_MESSAGES/django.po +1 -7
  663. wagtail/documents/locale/ka/LC_MESSAGES/django.po +1 -1
  664. wagtail/documents/locale/ko/LC_MESSAGES/django.mo +0 -0
  665. wagtail/documents/locale/ko/LC_MESSAGES/django.po +1 -6
  666. wagtail/documents/locale/lt/LC_MESSAGES/django.mo +0 -0
  667. wagtail/documents/locale/lt/LC_MESSAGES/django.po +1 -5
  668. wagtail/documents/locale/lv/LC_MESSAGES/django.po +1 -1
  669. wagtail/documents/locale/mi/LC_MESSAGES/django.mo +0 -0
  670. wagtail/documents/locale/mi/LC_MESSAGES/django.po +1 -7
  671. wagtail/documents/locale/mn/LC_MESSAGES/django.mo +0 -0
  672. wagtail/documents/locale/mn/LC_MESSAGES/django.po +1 -5
  673. wagtail/documents/locale/my/LC_MESSAGES/django.po +1 -1
  674. wagtail/documents/locale/nb/LC_MESSAGES/django.mo +0 -0
  675. wagtail/documents/locale/nb/LC_MESSAGES/django.po +1 -5
  676. wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
  677. wagtail/documents/locale/nl/LC_MESSAGES/django.po +6 -6
  678. wagtail/documents/locale/pl/LC_MESSAGES/django.mo +0 -0
  679. wagtail/documents/locale/pl/LC_MESSAGES/django.po +1 -6
  680. wagtail/documents/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  681. wagtail/documents/locale/pt_BR/LC_MESSAGES/django.po +1 -7
  682. wagtail/documents/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  683. wagtail/documents/locale/pt_PT/LC_MESSAGES/django.po +1 -6
  684. wagtail/documents/locale/ro/LC_MESSAGES/django.mo +0 -0
  685. wagtail/documents/locale/ro/LC_MESSAGES/django.po +1 -5
  686. wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
  687. wagtail/documents/locale/ru/LC_MESSAGES/django.po +1 -7
  688. wagtail/documents/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  689. wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +1 -5
  690. wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
  691. wagtail/documents/locale/sl/LC_MESSAGES/django.po +1 -7
  692. wagtail/documents/locale/sv/LC_MESSAGES/django.mo +0 -0
  693. wagtail/documents/locale/sv/LC_MESSAGES/django.po +1 -6
  694. wagtail/documents/locale/tet/LC_MESSAGES/django.po +1 -1
  695. wagtail/documents/locale/th/LC_MESSAGES/django.mo +0 -0
  696. wagtail/documents/locale/th/LC_MESSAGES/django.po +1 -5
  697. wagtail/documents/locale/tr/LC_MESSAGES/django.mo +0 -0
  698. wagtail/documents/locale/tr/LC_MESSAGES/django.po +13 -5
  699. wagtail/documents/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  700. wagtail/documents/locale/tr_TR/LC_MESSAGES/django.po +1 -5
  701. wagtail/documents/locale/ug/LC_MESSAGES/django.mo +0 -0
  702. wagtail/documents/locale/ug/LC_MESSAGES/django.po +1 -5
  703. wagtail/documents/locale/uk/LC_MESSAGES/django.mo +0 -0
  704. wagtail/documents/locale/uk/LC_MESSAGES/django.po +1 -5
  705. wagtail/documents/locale/vi/LC_MESSAGES/django.po +1 -1
  706. wagtail/documents/locale/zh/LC_MESSAGES/django.po +1 -1
  707. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  708. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +1 -5
  709. wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  710. wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.po +1 -5
  711. wagtail/documents/tests/test_admin_views.py +35 -3
  712. wagtail/documents/tests/test_search.py +41 -27
  713. wagtail/documents/views/documents.py +31 -5
  714. wagtail/embeds/locale/ar/LC_MESSAGES/django.po +1 -1
  715. wagtail/embeds/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  716. wagtail/embeds/locale/be/LC_MESSAGES/django.po +1 -1
  717. wagtail/embeds/locale/bg/LC_MESSAGES/django.po +1 -1
  718. wagtail/embeds/locale/bn/LC_MESSAGES/django.po +1 -1
  719. wagtail/embeds/locale/ca/LC_MESSAGES/django.po +1 -1
  720. wagtail/embeds/locale/cs/LC_MESSAGES/django.po +1 -1
  721. wagtail/embeds/locale/cy/LC_MESSAGES/django.po +1 -1
  722. wagtail/embeds/locale/da/LC_MESSAGES/django.po +1 -1
  723. wagtail/embeds/locale/de/LC_MESSAGES/django.po +1 -1
  724. wagtail/embeds/locale/dv/LC_MESSAGES/django.po +1 -1
  725. wagtail/embeds/locale/el/LC_MESSAGES/django.po +1 -1
  726. wagtail/embeds/locale/es/LC_MESSAGES/django.po +1 -1
  727. wagtail/embeds/locale/es_419/LC_MESSAGES/django.po +1 -1
  728. wagtail/embeds/locale/et/LC_MESSAGES/django.po +1 -1
  729. wagtail/embeds/locale/fa/LC_MESSAGES/django.po +1 -1
  730. wagtail/embeds/locale/fi/LC_MESSAGES/django.po +1 -1
  731. wagtail/embeds/locale/fr/LC_MESSAGES/django.po +1 -1
  732. wagtail/embeds/locale/gl/LC_MESSAGES/django.po +1 -1
  733. wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po +1 -1
  734. wagtail/embeds/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  735. wagtail/embeds/locale/ht/LC_MESSAGES/django.po +1 -1
  736. wagtail/embeds/locale/hu/LC_MESSAGES/django.po +1 -1
  737. wagtail/embeds/locale/id_ID/LC_MESSAGES/django.po +1 -1
  738. wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po +1 -1
  739. wagtail/embeds/locale/it/LC_MESSAGES/django.po +1 -1
  740. wagtail/embeds/locale/ja/LC_MESSAGES/django.po +1 -1
  741. wagtail/embeds/locale/ko/LC_MESSAGES/django.po +1 -1
  742. wagtail/embeds/locale/lt/LC_MESSAGES/django.po +1 -1
  743. wagtail/embeds/locale/lv/LC_MESSAGES/django.po +1 -1
  744. wagtail/embeds/locale/mi/LC_MESSAGES/django.po +1 -1
  745. wagtail/embeds/locale/mn/LC_MESSAGES/django.po +1 -1
  746. wagtail/embeds/locale/my/LC_MESSAGES/django.po +1 -1
  747. wagtail/embeds/locale/nb/LC_MESSAGES/django.po +1 -1
  748. wagtail/embeds/locale/nl/LC_MESSAGES/django.po +1 -1
  749. wagtail/embeds/locale/pl/LC_MESSAGES/django.po +1 -1
  750. wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  751. wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  752. wagtail/embeds/locale/ro/LC_MESSAGES/django.po +1 -1
  753. wagtail/embeds/locale/ru/LC_MESSAGES/django.po +1 -1
  754. wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  755. wagtail/embeds/locale/sl/LC_MESSAGES/django.po +1 -1
  756. wagtail/embeds/locale/sv/LC_MESSAGES/django.po +1 -1
  757. wagtail/embeds/locale/tet/LC_MESSAGES/django.po +1 -1
  758. wagtail/embeds/locale/th/LC_MESSAGES/django.po +1 -1
  759. wagtail/embeds/locale/tr/LC_MESSAGES/django.po +1 -1
  760. wagtail/embeds/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  761. wagtail/embeds/locale/ug/LC_MESSAGES/django.po +1 -1
  762. wagtail/embeds/locale/uk/LC_MESSAGES/django.po +1 -1
  763. wagtail/embeds/locale/vi/LC_MESSAGES/django.po +1 -1
  764. wagtail/embeds/locale/zh/LC_MESSAGES/django.po +1 -1
  765. wagtail/embeds/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  766. wagtail/embeds/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  767. wagtail/images/forms.py +1 -1
  768. wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
  769. wagtail/images/locale/ar/LC_MESSAGES/django.po +7 -10
  770. wagtail/images/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  771. wagtail/images/locale/be/LC_MESSAGES/django.po +7 -7
  772. wagtail/images/locale/bg/LC_MESSAGES/django.po +4 -4
  773. wagtail/images/locale/bn/LC_MESSAGES/django.po +1 -1
  774. wagtail/images/locale/ca/LC_MESSAGES/django.mo +0 -0
  775. wagtail/images/locale/ca/LC_MESSAGES/django.po +15 -9
  776. wagtail/images/locale/cs/LC_MESSAGES/django.po +7 -7
  777. wagtail/images/locale/cy/LC_MESSAGES/django.po +4 -4
  778. wagtail/images/locale/da/LC_MESSAGES/django.po +1 -1
  779. wagtail/images/locale/de/LC_MESSAGES/django.po +7 -7
  780. wagtail/images/locale/dv/LC_MESSAGES/django.po +7 -7
  781. wagtail/images/locale/el/LC_MESSAGES/django.po +7 -7
  782. wagtail/images/locale/es/LC_MESSAGES/django.po +7 -7
  783. wagtail/images/locale/es_419/LC_MESSAGES/django.po +1 -1
  784. wagtail/images/locale/et/LC_MESSAGES/django.po +7 -7
  785. wagtail/images/locale/eu/LC_MESSAGES/django.po +1 -1
  786. wagtail/images/locale/fa/LC_MESSAGES/django.po +4 -4
  787. wagtail/images/locale/fi/LC_MESSAGES/django.mo +0 -0
  788. wagtail/images/locale/fi/LC_MESSAGES/django.po +18 -9
  789. wagtail/images/locale/fr/LC_MESSAGES/django.mo +0 -0
  790. wagtail/images/locale/fr/LC_MESSAGES/django.po +15 -9
  791. wagtail/images/locale/gl/LC_MESSAGES/django.mo +0 -0
  792. wagtail/images/locale/gl/LC_MESSAGES/django.po +15 -9
  793. wagtail/images/locale/he_IL/LC_MESSAGES/django.po +4 -4
  794. wagtail/images/locale/hr_HR/LC_MESSAGES/django.po +7 -7
  795. wagtail/images/locale/ht/LC_MESSAGES/django.po +1 -1
  796. wagtail/images/locale/hu/LC_MESSAGES/django.mo +0 -0
  797. wagtail/images/locale/hu/LC_MESSAGES/django.po +7 -10
  798. wagtail/images/locale/id_ID/LC_MESSAGES/django.po +4 -4
  799. wagtail/images/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  800. wagtail/images/locale/is_IS/LC_MESSAGES/django.po +34 -9
  801. wagtail/images/locale/it/LC_MESSAGES/django.po +7 -7
  802. wagtail/images/locale/ja/LC_MESSAGES/django.po +7 -7
  803. wagtail/images/locale/ka/LC_MESSAGES/django.po +4 -4
  804. wagtail/images/locale/ko/LC_MESSAGES/django.po +7 -7
  805. wagtail/images/locale/lt/LC_MESSAGES/django.po +7 -7
  806. wagtail/images/locale/lv/LC_MESSAGES/django.po +4 -4
  807. wagtail/images/locale/mi/LC_MESSAGES/django.po +7 -7
  808. wagtail/images/locale/mn/LC_MESSAGES/django.po +4 -4
  809. wagtail/images/locale/my/LC_MESSAGES/django.po +1 -1
  810. wagtail/images/locale/nb/LC_MESSAGES/django.po +7 -7
  811. wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
  812. wagtail/images/locale/nl/LC_MESSAGES/django.po +15 -9
  813. wagtail/images/locale/pl/LC_MESSAGES/django.po +7 -7
  814. wagtail/images/locale/pt_BR/LC_MESSAGES/django.po +7 -7
  815. wagtail/images/locale/pt_PT/LC_MESSAGES/django.po +7 -7
  816. wagtail/images/locale/ro/LC_MESSAGES/django.po +7 -7
  817. wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
  818. wagtail/images/locale/ru/LC_MESSAGES/django.po +7 -10
  819. wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +4 -4
  820. wagtail/images/locale/sl/LC_MESSAGES/django.po +7 -7
  821. wagtail/images/locale/sv/LC_MESSAGES/django.po +7 -7
  822. wagtail/images/locale/tet/LC_MESSAGES/django.po +4 -4
  823. wagtail/images/locale/th/LC_MESSAGES/django.po +4 -4
  824. wagtail/images/locale/tr/LC_MESSAGES/django.mo +0 -0
  825. wagtail/images/locale/tr/LC_MESSAGES/django.po +85 -7
  826. wagtail/images/locale/tr_TR/LC_MESSAGES/django.po +4 -4
  827. wagtail/images/locale/ug/LC_MESSAGES/django.po +7 -7
  828. wagtail/images/locale/uk/LC_MESSAGES/django.po +7 -7
  829. wagtail/images/locale/vi/LC_MESSAGES/django.po +4 -4
  830. wagtail/images/locale/zh/LC_MESSAGES/django.po +4 -4
  831. wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +7 -7
  832. wagtail/images/locale/zh_Hant/LC_MESSAGES/django.po +7 -7
  833. wagtail/images/tests/test_admin_views.py +75 -6
  834. wagtail/images/tests/test_models.py +40 -26
  835. wagtail/images/views/chooser.py +10 -5
  836. wagtail/images/views/images.py +36 -6
  837. wagtail/locale/af/LC_MESSAGES/django.po +1 -1
  838. wagtail/locale/ar/LC_MESSAGES/django.mo +0 -0
  839. wagtail/locale/ar/LC_MESSAGES/django.po +1 -9
  840. wagtail/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  841. wagtail/locale/be/LC_MESSAGES/django.po +1 -1
  842. wagtail/locale/bg/LC_MESSAGES/django.po +1 -1
  843. wagtail/locale/bn/LC_MESSAGES/django.po +1 -1
  844. wagtail/locale/ca/LC_MESSAGES/django.mo +0 -0
  845. wagtail/locale/ca/LC_MESSAGES/django.po +4 -4
  846. wagtail/locale/cs/LC_MESSAGES/django.po +1 -1
  847. wagtail/locale/cy/LC_MESSAGES/django.po +1 -1
  848. wagtail/locale/da/LC_MESSAGES/django.po +1 -1
  849. wagtail/locale/de/LC_MESSAGES/django.mo +0 -0
  850. wagtail/locale/de/LC_MESSAGES/django.po +1 -9
  851. wagtail/locale/dv/LC_MESSAGES/django.mo +0 -0
  852. wagtail/locale/dv/LC_MESSAGES/django.po +1 -8
  853. wagtail/locale/el/LC_MESSAGES/django.po +1 -1
  854. wagtail/locale/es/LC_MESSAGES/django.po +1 -1
  855. wagtail/locale/es_419/LC_MESSAGES/django.po +1 -1
  856. wagtail/locale/et/LC_MESSAGES/django.po +1 -1
  857. wagtail/locale/eu/LC_MESSAGES/django.po +1 -1
  858. wagtail/locale/fa/LC_MESSAGES/django.po +1 -1
  859. wagtail/locale/fi/LC_MESSAGES/django.po +1 -1
  860. wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
  861. wagtail/locale/fr/LC_MESSAGES/django.po +4 -4
  862. wagtail/locale/gl/LC_MESSAGES/django.mo +0 -0
  863. wagtail/locale/gl/LC_MESSAGES/django.po +3 -3
  864. wagtail/locale/he_IL/LC_MESSAGES/django.po +1 -1
  865. wagtail/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  866. wagtail/locale/hu/LC_MESSAGES/django.mo +0 -0
  867. wagtail/locale/hu/LC_MESSAGES/django.po +1 -9
  868. wagtail/locale/id_ID/LC_MESSAGES/django.po +1 -1
  869. wagtail/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  870. wagtail/locale/is_IS/LC_MESSAGES/django.po +14 -4
  871. wagtail/locale/it/LC_MESSAGES/django.po +1 -1
  872. wagtail/locale/ja/LC_MESSAGES/django.po +1 -1
  873. wagtail/locale/ka/LC_MESSAGES/django.po +1 -1
  874. wagtail/locale/ko/LC_MESSAGES/django.po +1 -1
  875. wagtail/locale/lt/LC_MESSAGES/django.po +1 -1
  876. wagtail/locale/lv/LC_MESSAGES/django.po +1 -1
  877. wagtail/locale/mi/LC_MESSAGES/django.po +1 -1
  878. wagtail/locale/mn/LC_MESSAGES/django.po +1 -1
  879. wagtail/locale/my/LC_MESSAGES/django.po +1 -1
  880. wagtail/locale/nb/LC_MESSAGES/django.po +1 -1
  881. wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
  882. wagtail/locale/nl/LC_MESSAGES/django.po +4 -4
  883. wagtail/locale/pl/LC_MESSAGES/django.mo +0 -0
  884. wagtail/locale/pl/LC_MESSAGES/django.po +1 -9
  885. wagtail/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  886. wagtail/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  887. wagtail/locale/ro/LC_MESSAGES/django.mo +0 -0
  888. wagtail/locale/ro/LC_MESSAGES/django.po +1 -9
  889. wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
  890. wagtail/locale/ru/LC_MESSAGES/django.po +1 -9
  891. wagtail/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  892. wagtail/locale/sl/LC_MESSAGES/django.mo +0 -0
  893. wagtail/locale/sl/LC_MESSAGES/django.po +1 -9
  894. wagtail/locale/sv/LC_MESSAGES/django.mo +0 -0
  895. wagtail/locale/sv/LC_MESSAGES/django.po +1 -9
  896. wagtail/locale/tet/LC_MESSAGES/django.po +1 -1
  897. wagtail/locale/th/LC_MESSAGES/django.po +1 -1
  898. wagtail/locale/tr/LC_MESSAGES/django.mo +0 -0
  899. wagtail/locale/tr/LC_MESSAGES/django.po +4 -8
  900. wagtail/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  901. wagtail/locale/ug/LC_MESSAGES/django.mo +0 -0
  902. wagtail/locale/ug/LC_MESSAGES/django.po +1 -8
  903. wagtail/locale/uk/LC_MESSAGES/django.po +1 -1
  904. wagtail/locale/vi/LC_MESSAGES/django.po +1 -1
  905. wagtail/locale/zh/LC_MESSAGES/django.po +1 -1
  906. wagtail/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  907. wagtail/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  908. wagtail/locales/locale/ar/LC_MESSAGES/django.po +1 -1
  909. wagtail/locales/locale/be/LC_MESSAGES/django.po +1 -1
  910. wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
  911. wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
  912. wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
  913. wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
  914. wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
  915. wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
  916. wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
  917. wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
  918. wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
  919. wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
  920. wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
  921. wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
  922. wagtail/locales/locale/fr/LC_MESSAGES/django.po +1 -1
  923. wagtail/locales/locale/gl/LC_MESSAGES/django.po +1 -1
  924. wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
  925. wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  926. wagtail/locales/locale/hu/LC_MESSAGES/django.po +1 -1
  927. wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
  928. wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +1 -1
  929. wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
  930. wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
  931. wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
  932. wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
  933. wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
  934. wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
  935. wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
  936. wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
  937. wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
  938. wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
  939. wagtail/locales/locale/pl/LC_MESSAGES/django.po +1 -1
  940. wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  941. wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  942. wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
  943. wagtail/locales/locale/ru/LC_MESSAGES/django.po +1 -1
  944. wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  945. wagtail/locales/locale/sl/LC_MESSAGES/django.po +1 -1
  946. wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
  947. wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
  948. wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
  949. wagtail/locales/locale/tr/LC_MESSAGES/django.po +1 -1
  950. wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  951. wagtail/locales/locale/ug/LC_MESSAGES/django.po +1 -1
  952. wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
  953. wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
  954. wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
  955. wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  956. wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  957. wagtail/migrations/0096_referenceindex_referenceindex_source_object_and_more.py +28 -0
  958. wagtail/models/reference_index.py +26 -0
  959. wagtail/project_template/requirements.txt +1 -1
  960. wagtail/search/apps.py +1 -1
  961. wagtail/search/backends/__init__.py +1 -1
  962. wagtail/search/backends/base.py +1 -1
  963. wagtail/search/backends/database/__init__.py +1 -1
  964. wagtail/search/backends/database/fallback.py +1 -1
  965. wagtail/search/backends/database/mysql/mysql.py +1 -1
  966. wagtail/search/backends/database/mysql/query.py +1 -1
  967. wagtail/search/backends/database/postgres/postgres.py +1 -1
  968. wagtail/search/backends/database/postgres/query.py +1 -1
  969. wagtail/search/backends/database/postgres/weights.py +1 -1
  970. wagtail/search/backends/database/sqlite/query.py +1 -1
  971. wagtail/search/backends/database/sqlite/sqlite.py +1 -1
  972. wagtail/search/backends/database/sqlite/utils.py +1 -1
  973. wagtail/search/backends/elasticsearch7.py +4 -4
  974. wagtail/search/backends/elasticsearch8.py +4 -4
  975. wagtail/search/backends/elasticsearch9.py +4 -4
  976. wagtail/search/backends/opensearch2.py +4 -4
  977. wagtail/search/backends/opensearch3.py +4 -4
  978. wagtail/search/index.py +1 -1
  979. wagtail/search/locale/ar/LC_MESSAGES/django.mo +0 -0
  980. wagtail/search/locale/ar/LC_MESSAGES/django.po +1 -7
  981. wagtail/search/locale/be/LC_MESSAGES/django.mo +0 -0
  982. wagtail/search/locale/be/LC_MESSAGES/django.po +1 -7
  983. wagtail/search/locale/ca/LC_MESSAGES/django.mo +0 -0
  984. wagtail/search/locale/ca/LC_MESSAGES/django.po +1 -7
  985. wagtail/search/locale/cs/LC_MESSAGES/django.po +1 -1
  986. wagtail/search/locale/cy/LC_MESSAGES/django.mo +0 -0
  987. wagtail/search/locale/cy/LC_MESSAGES/django.po +1 -7
  988. wagtail/search/locale/de/LC_MESSAGES/django.mo +0 -0
  989. wagtail/search/locale/de/LC_MESSAGES/django.po +1 -7
  990. wagtail/search/locale/dv/LC_MESSAGES/django.mo +0 -0
  991. wagtail/search/locale/dv/LC_MESSAGES/django.po +1 -7
  992. wagtail/search/locale/es/LC_MESSAGES/django.mo +0 -0
  993. wagtail/search/locale/es/LC_MESSAGES/django.po +1 -7
  994. wagtail/search/locale/et/LC_MESSAGES/django.po +1 -1
  995. wagtail/search/locale/fa/LC_MESSAGES/django.po +1 -1
  996. wagtail/search/locale/fi/LC_MESSAGES/django.mo +0 -0
  997. wagtail/search/locale/fi/LC_MESSAGES/django.po +1 -7
  998. wagtail/search/locale/fr/LC_MESSAGES/django.mo +0 -0
  999. wagtail/search/locale/fr/LC_MESSAGES/django.po +1 -7
  1000. wagtail/search/locale/gl/LC_MESSAGES/django.mo +0 -0
  1001. wagtail/search/locale/gl/LC_MESSAGES/django.po +1 -7
  1002. wagtail/search/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  1003. wagtail/search/locale/hr_HR/LC_MESSAGES/django.po +1 -7
  1004. wagtail/search/locale/ht/LC_MESSAGES/django.po +1 -1
  1005. wagtail/search/locale/hu/LC_MESSAGES/django.mo +0 -0
  1006. wagtail/search/locale/hu/LC_MESSAGES/django.po +1 -7
  1007. wagtail/search/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1008. wagtail/search/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1009. wagtail/search/locale/is_IS/LC_MESSAGES/django.po +1 -7
  1010. wagtail/search/locale/it/LC_MESSAGES/django.mo +0 -0
  1011. wagtail/search/locale/it/LC_MESSAGES/django.po +1 -7
  1012. wagtail/search/locale/ja/LC_MESSAGES/django.po +1 -1
  1013. wagtail/search/locale/ko/LC_MESSAGES/django.mo +0 -0
  1014. wagtail/search/locale/ko/LC_MESSAGES/django.po +1 -7
  1015. wagtail/search/locale/lt/LC_MESSAGES/django.po +1 -1
  1016. wagtail/search/locale/mi/LC_MESSAGES/django.po +1 -1
  1017. wagtail/search/locale/mn/LC_MESSAGES/django.po +1 -1
  1018. wagtail/search/locale/my/LC_MESSAGES/django.po +1 -1
  1019. wagtail/search/locale/nb/LC_MESSAGES/django.mo +0 -0
  1020. wagtail/search/locale/nb/LC_MESSAGES/django.po +1 -7
  1021. wagtail/search/locale/nl/LC_MESSAGES/django.mo +0 -0
  1022. wagtail/search/locale/nl/LC_MESSAGES/django.po +1 -7
  1023. wagtail/search/locale/pl/LC_MESSAGES/django.mo +0 -0
  1024. wagtail/search/locale/pl/LC_MESSAGES/django.po +1 -7
  1025. wagtail/search/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  1026. wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +1 -7
  1027. wagtail/search/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  1028. wagtail/search/locale/pt_PT/LC_MESSAGES/django.po +1 -7
  1029. wagtail/search/locale/ro/LC_MESSAGES/django.mo +0 -0
  1030. wagtail/search/locale/ro/LC_MESSAGES/django.po +1 -7
  1031. wagtail/search/locale/ru/LC_MESSAGES/django.mo +0 -0
  1032. wagtail/search/locale/ru/LC_MESSAGES/django.po +1 -7
  1033. wagtail/search/locale/sl/LC_MESSAGES/django.mo +0 -0
  1034. wagtail/search/locale/sl/LC_MESSAGES/django.po +1 -7
  1035. wagtail/search/locale/sv/LC_MESSAGES/django.mo +0 -0
  1036. wagtail/search/locale/sv/LC_MESSAGES/django.po +1 -7
  1037. wagtail/search/locale/tet/LC_MESSAGES/django.po +1 -1
  1038. wagtail/search/locale/th/LC_MESSAGES/django.po +1 -1
  1039. wagtail/search/locale/tr/LC_MESSAGES/django.mo +0 -0
  1040. wagtail/search/locale/tr/LC_MESSAGES/django.po +1 -7
  1041. wagtail/search/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1042. wagtail/search/locale/ug/LC_MESSAGES/django.mo +0 -0
  1043. wagtail/search/locale/ug/LC_MESSAGES/django.po +1 -7
  1044. wagtail/search/locale/uk/LC_MESSAGES/django.mo +0 -0
  1045. wagtail/search/locale/uk/LC_MESSAGES/django.po +1 -7
  1046. wagtail/search/locale/vi/LC_MESSAGES/django.po +1 -1
  1047. wagtail/search/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1048. wagtail/search/locale/zh_Hans/LC_MESSAGES/django.po +1 -7
  1049. wagtail/search/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1050. wagtail/search/management/commands/update_index.py +1 -1
  1051. wagtail/search/management/commands/wagtail_update_index.py +1 -1
  1052. wagtail/search/models.py +1 -4
  1053. wagtail/search/query.py +1 -1
  1054. wagtail/search/queryset.py +1 -1
  1055. wagtail/search/signal_handlers.py +1 -1
  1056. wagtail/search/tasks.py +1 -1
  1057. wagtail/search/utils.py +1 -1
  1058. wagtail/sites/locale/ar/LC_MESSAGES/django.po +1 -1
  1059. wagtail/sites/locale/be/LC_MESSAGES/django.po +1 -1
  1060. wagtail/sites/locale/bn/LC_MESSAGES/django.po +1 -1
  1061. wagtail/sites/locale/ca/LC_MESSAGES/django.po +1 -1
  1062. wagtail/sites/locale/cs/LC_MESSAGES/django.po +1 -1
  1063. wagtail/sites/locale/cy/LC_MESSAGES/django.po +1 -1
  1064. wagtail/sites/locale/da/LC_MESSAGES/django.po +1 -1
  1065. wagtail/sites/locale/de/LC_MESSAGES/django.po +1 -1
  1066. wagtail/sites/locale/dv/LC_MESSAGES/django.po +1 -1
  1067. wagtail/sites/locale/el/LC_MESSAGES/django.po +1 -1
  1068. wagtail/sites/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1069. wagtail/sites/locale/es/LC_MESSAGES/django.po +1 -1
  1070. wagtail/sites/locale/es_419/LC_MESSAGES/django.po +1 -1
  1071. wagtail/sites/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1072. wagtail/sites/locale/et/LC_MESSAGES/django.po +1 -1
  1073. wagtail/sites/locale/fa/LC_MESSAGES/django.po +1 -1
  1074. wagtail/sites/locale/fi/LC_MESSAGES/django.po +1 -1
  1075. wagtail/sites/locale/fr/LC_MESSAGES/django.po +1 -1
  1076. wagtail/sites/locale/gl/LC_MESSAGES/django.po +1 -1
  1077. wagtail/sites/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1078. wagtail/sites/locale/hi/LC_MESSAGES/django.po +1 -1
  1079. wagtail/sites/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1080. wagtail/sites/locale/ht/LC_MESSAGES/django.po +1 -1
  1081. wagtail/sites/locale/hu/LC_MESSAGES/django.po +1 -1
  1082. wagtail/sites/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1083. wagtail/sites/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1084. wagtail/sites/locale/it/LC_MESSAGES/django.po +1 -1
  1085. wagtail/sites/locale/ja/LC_MESSAGES/django.po +1 -1
  1086. wagtail/sites/locale/ka/LC_MESSAGES/django.po +1 -1
  1087. wagtail/sites/locale/ko/LC_MESSAGES/django.po +1 -1
  1088. wagtail/sites/locale/lt/LC_MESSAGES/django.po +1 -1
  1089. wagtail/sites/locale/lv/LC_MESSAGES/django.po +1 -1
  1090. wagtail/sites/locale/mi/LC_MESSAGES/django.po +1 -1
  1091. wagtail/sites/locale/mn/LC_MESSAGES/django.po +1 -1
  1092. wagtail/sites/locale/my/LC_MESSAGES/django.po +1 -1
  1093. wagtail/sites/locale/nb/LC_MESSAGES/django.po +1 -1
  1094. wagtail/sites/locale/nl/LC_MESSAGES/django.po +1 -1
  1095. wagtail/sites/locale/pl/LC_MESSAGES/django.po +1 -1
  1096. wagtail/sites/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1097. wagtail/sites/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1098. wagtail/sites/locale/ro/LC_MESSAGES/django.po +1 -1
  1099. wagtail/sites/locale/ru/LC_MESSAGES/django.po +1 -1
  1100. wagtail/sites/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1101. wagtail/sites/locale/sl/LC_MESSAGES/django.po +1 -1
  1102. wagtail/sites/locale/sr/LC_MESSAGES/django.po +1 -1
  1103. wagtail/sites/locale/sv/LC_MESSAGES/django.po +1 -1
  1104. wagtail/sites/locale/ta/LC_MESSAGES/django.po +1 -1
  1105. wagtail/sites/locale/tet/LC_MESSAGES/django.po +1 -1
  1106. wagtail/sites/locale/th/LC_MESSAGES/django.po +1 -1
  1107. wagtail/sites/locale/tr/LC_MESSAGES/django.po +1 -1
  1108. wagtail/sites/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1109. wagtail/sites/locale/ug/LC_MESSAGES/django.po +1 -1
  1110. wagtail/sites/locale/uk/LC_MESSAGES/django.po +1 -1
  1111. wagtail/sites/locale/vi/LC_MESSAGES/django.po +1 -1
  1112. wagtail/sites/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1113. wagtail/sites/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1114. wagtail/snippets/locale/af/LC_MESSAGES/django.po +1 -1
  1115. wagtail/snippets/locale/ar/LC_MESSAGES/django.po +1 -1
  1116. wagtail/snippets/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1117. wagtail/snippets/locale/be/LC_MESSAGES/django.po +1 -1
  1118. wagtail/snippets/locale/bg/LC_MESSAGES/django.po +1 -1
  1119. wagtail/snippets/locale/bn/LC_MESSAGES/django.po +1 -1
  1120. wagtail/snippets/locale/ca/LC_MESSAGES/django.po +1 -1
  1121. wagtail/snippets/locale/cs/LC_MESSAGES/django.po +1 -1
  1122. wagtail/snippets/locale/cy/LC_MESSAGES/django.po +1 -1
  1123. wagtail/snippets/locale/da/LC_MESSAGES/django.po +1 -1
  1124. wagtail/snippets/locale/de/LC_MESSAGES/django.po +1 -1
  1125. wagtail/snippets/locale/dv/LC_MESSAGES/django.po +1 -1
  1126. wagtail/snippets/locale/el/LC_MESSAGES/django.po +1 -1
  1127. wagtail/snippets/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1128. wagtail/snippets/locale/es/LC_MESSAGES/django.po +1 -1
  1129. wagtail/snippets/locale/es_419/LC_MESSAGES/django.po +1 -1
  1130. wagtail/snippets/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1131. wagtail/snippets/locale/et/LC_MESSAGES/django.po +1 -1
  1132. wagtail/snippets/locale/eu/LC_MESSAGES/django.po +1 -1
  1133. wagtail/snippets/locale/fa/LC_MESSAGES/django.po +1 -1
  1134. wagtail/snippets/locale/fi/LC_MESSAGES/django.po +1 -1
  1135. wagtail/snippets/locale/fr/LC_MESSAGES/django.po +1 -1
  1136. wagtail/snippets/locale/gl/LC_MESSAGES/django.po +1 -1
  1137. wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1138. wagtail/snippets/locale/hi/LC_MESSAGES/django.po +1 -1
  1139. wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1140. wagtail/snippets/locale/ht/LC_MESSAGES/django.po +1 -1
  1141. wagtail/snippets/locale/hu/LC_MESSAGES/django.po +1 -1
  1142. wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1143. wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1144. wagtail/snippets/locale/it/LC_MESSAGES/django.po +1 -1
  1145. wagtail/snippets/locale/ja/LC_MESSAGES/django.po +1 -1
  1146. wagtail/snippets/locale/ka/LC_MESSAGES/django.po +1 -1
  1147. wagtail/snippets/locale/ko/LC_MESSAGES/django.po +1 -1
  1148. wagtail/snippets/locale/lt/LC_MESSAGES/django.po +1 -1
  1149. wagtail/snippets/locale/lv/LC_MESSAGES/django.po +1 -1
  1150. wagtail/snippets/locale/mi/LC_MESSAGES/django.po +1 -1
  1151. wagtail/snippets/locale/mn/LC_MESSAGES/django.po +1 -1
  1152. wagtail/snippets/locale/my/LC_MESSAGES/django.po +1 -1
  1153. wagtail/snippets/locale/nb/LC_MESSAGES/django.po +1 -1
  1154. wagtail/snippets/locale/nl/LC_MESSAGES/django.po +1 -1
  1155. wagtail/snippets/locale/pl/LC_MESSAGES/django.po +1 -1
  1156. wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1157. wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1158. wagtail/snippets/locale/ro/LC_MESSAGES/django.po +1 -1
  1159. wagtail/snippets/locale/ru/LC_MESSAGES/django.po +1 -1
  1160. wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1161. wagtail/snippets/locale/sl/LC_MESSAGES/django.po +1 -1
  1162. wagtail/snippets/locale/sr/LC_MESSAGES/django.po +1 -1
  1163. wagtail/snippets/locale/sv/LC_MESSAGES/django.po +1 -1
  1164. wagtail/snippets/locale/ta/LC_MESSAGES/django.po +1 -1
  1165. wagtail/snippets/locale/tet/LC_MESSAGES/django.po +1 -1
  1166. wagtail/snippets/locale/th/LC_MESSAGES/django.po +1 -1
  1167. wagtail/snippets/locale/tr/LC_MESSAGES/django.po +1 -1
  1168. wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1169. wagtail/snippets/locale/ug/LC_MESSAGES/django.po +1 -1
  1170. wagtail/snippets/locale/uk/LC_MESSAGES/django.po +1 -1
  1171. wagtail/snippets/locale/vi/LC_MESSAGES/django.po +1 -1
  1172. wagtail/snippets/locale/zh/LC_MESSAGES/django.po +1 -1
  1173. wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1174. wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1175. wagtail/snippets/tests/test_preview.py +75 -8
  1176. wagtail/snippets/tests/test_snippets.py +12 -0
  1177. wagtail/users/locale/ar/LC_MESSAGES/django.po +1 -1
  1178. wagtail/users/locale/be/LC_MESSAGES/django.po +1 -1
  1179. wagtail/users/locale/bg/LC_MESSAGES/django.po +1 -1
  1180. wagtail/users/locale/bn/LC_MESSAGES/django.po +1 -1
  1181. wagtail/users/locale/ca/LC_MESSAGES/django.po +1 -1
  1182. wagtail/users/locale/cs/LC_MESSAGES/django.po +1 -1
  1183. wagtail/users/locale/cy/LC_MESSAGES/django.po +1 -1
  1184. wagtail/users/locale/da/LC_MESSAGES/django.po +1 -1
  1185. wagtail/users/locale/de/LC_MESSAGES/django.po +1 -1
  1186. wagtail/users/locale/dv/LC_MESSAGES/django.po +1 -1
  1187. wagtail/users/locale/el/LC_MESSAGES/django.po +1 -1
  1188. wagtail/users/locale/es/LC_MESSAGES/django.po +1 -1
  1189. wagtail/users/locale/es_419/LC_MESSAGES/django.po +1 -1
  1190. wagtail/users/locale/et/LC_MESSAGES/django.po +1 -1
  1191. wagtail/users/locale/eu/LC_MESSAGES/django.po +1 -1
  1192. wagtail/users/locale/fa/LC_MESSAGES/django.po +1 -1
  1193. wagtail/users/locale/fi/LC_MESSAGES/django.mo +0 -0
  1194. wagtail/users/locale/fi/LC_MESSAGES/django.po +6 -3
  1195. wagtail/users/locale/fr/LC_MESSAGES/django.po +1 -1
  1196. wagtail/users/locale/gl/LC_MESSAGES/django.po +1 -1
  1197. wagtail/users/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1198. wagtail/users/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1199. wagtail/users/locale/hu/LC_MESSAGES/django.po +1 -1
  1200. wagtail/users/locale/hy/LC_MESSAGES/django.po +1 -1
  1201. wagtail/users/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1202. wagtail/users/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1203. wagtail/users/locale/is_IS/LC_MESSAGES/django.po +7 -3
  1204. wagtail/users/locale/it/LC_MESSAGES/django.po +1 -1
  1205. wagtail/users/locale/ja/LC_MESSAGES/django.po +1 -1
  1206. wagtail/users/locale/ka/LC_MESSAGES/django.po +1 -1
  1207. wagtail/users/locale/ko/LC_MESSAGES/django.po +1 -1
  1208. wagtail/users/locale/lt/LC_MESSAGES/django.po +1 -1
  1209. wagtail/users/locale/lv/LC_MESSAGES/django.po +1 -1
  1210. wagtail/users/locale/mi/LC_MESSAGES/django.po +1 -1
  1211. wagtail/users/locale/mn/LC_MESSAGES/django.po +1 -1
  1212. wagtail/users/locale/my/LC_MESSAGES/django.po +1 -1
  1213. wagtail/users/locale/nb/LC_MESSAGES/django.po +1 -1
  1214. wagtail/users/locale/nl/LC_MESSAGES/django.po +1 -1
  1215. wagtail/users/locale/pl/LC_MESSAGES/django.po +1 -1
  1216. wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1217. wagtail/users/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1218. wagtail/users/locale/ro/LC_MESSAGES/django.po +1 -1
  1219. wagtail/users/locale/ru/LC_MESSAGES/django.po +1 -1
  1220. wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1221. wagtail/users/locale/sl/LC_MESSAGES/django.po +1 -1
  1222. wagtail/users/locale/sv/LC_MESSAGES/django.po +1 -1
  1223. wagtail/users/locale/tet/LC_MESSAGES/django.po +1 -1
  1224. wagtail/users/locale/th/LC_MESSAGES/django.po +1 -1
  1225. wagtail/users/locale/tr/LC_MESSAGES/django.po +1 -1
  1226. wagtail/users/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1227. wagtail/users/locale/ug/LC_MESSAGES/django.po +1 -1
  1228. wagtail/users/locale/uk/LC_MESSAGES/django.po +1 -1
  1229. wagtail/users/locale/vi/LC_MESSAGES/django.po +1 -1
  1230. wagtail/users/locale/zh/LC_MESSAGES/django.po +1 -1
  1231. wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1232. wagtail/users/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1233. {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/METADATA +3 -3
  1234. {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/RECORD +1238 -1237
  1235. {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/WHEEL +1 -1
  1236. {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/entry_points.txt +0 -0
  1237. {wagtail-7.2rc1.dist-info → wagtail-7.2.2.dist-info}/licenses/LICENSE +0 -0
  1238. {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, returns it unchanged.
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
- class PreviewOnEdit(View):
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
- return get_object_or_404(
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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-07-24 16:20+0200\n"
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/"