Wykres commitów

13036 Commity (a67fd85fcf7f029aecd33e3699e2f5e549e54cee)

Autor SHA1 Wiadomość Data
Matt Westcott a67fd85fcf Rename reshow_upload_form step on document chooser to reshow_creation_form
We'll standardise on this name, since not all creation forms involve uploads.
2022-05-25 20:10:47 +10:00
Matt Westcott 34f646c611 Move reshow_creation_form step handling into the base ChooserModalOnloadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott 29fbfd0ea4 Move ajaxifyDocumentUploadForm logic into the base ChooserModalOnLoadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott c5d6bb32e5 Use data-chooser-modal-search-filter attribute to identify the snippet locale filter 2022-05-25 20:10:47 +10:00
Matt Westcott b45d2a0973 Adopt a standard data-chooser-modal-search attribute to identify the search form 2022-05-25 20:10:47 +10:00
Matt Westcott b958585ff8 Add a containerElement option to SearchController to limit scope of selectors
This will allow us to use more generic selector names without risking false matches. While we're at it, consistently use containerElement as the variable name for this rather than context, because context typically refers to template context dictionaries.
2022-05-25 20:10:47 +10:00
Matt Westcott 910ca8ca51 Change document chooser step names to 'choose' and 'chosen' for consistency with snippet chooser 2022-05-25 20:10:47 +10:00
Matt Westcott b37d16b07b Adopt a standard data-chooser-modal-choice attribute to identify 'chosen' links 2022-05-25 20:10:47 +10:00
Matt Westcott b5746c386b Convert document chooser modal onload handlers to a subclass of ChooserModalOnloadHandlerFactory 2022-05-25 20:10:47 +10:00
Matt Westcott 0ac07eba5e Introduce a factory class for generating the onload handlers 2022-05-25 20:10:47 +10:00
LB Johnston 115879c519 add changelog for #7897 2022-05-25 19:34:52 +10:00
Matt Westcott 246a270f10 Make image upload forms use the correct widget for custom tag models 2022-05-25 19:34:52 +10:00
Matt Westcott f57fc32ed0 Make document upload forms use the correct widget for custom tag models 2022-05-25 19:34:52 +10:00
LB Johnston 46efee9eeb add changelog for #8532 2022-05-25 19:02:46 +10:00
Matt Westcott 6b30a1aae9 Use SearchController on task chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott fc31a6711d Use SearchController on snippet chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott 1fc66294a4 Move snippet-chooser-modal.js to client js 2022-05-25 19:00:50 +10:00
Matt Westcott 2af6ad3683 Use SearchController on document chooser modal 2022-05-25 19:00:50 +10:00
Matt Westcott 6e9660c67b Add a reusable helper function for submitting creation forms 2022-05-25 19:00:50 +10:00
Matt Westcott d311a40e27 Use gettext for server error messages in modals
This avoids the need to pass them in jsonData (which was broken in a few cases anyhow, since we were forgetting to pass jsonData to the ajaxify function)
2022-05-25 19:00:50 +10:00
LB Johnston 48d397f74f Add changelog for #8501 2022-05-25 17:07:55 +10:00
Matt Westcott 08d06d623e Move remaining common context variables into BaseChooser 2022-05-25 16:32:07 +10:00
Matt Westcott 80bcc1b3dd Simplify title handling 2022-05-25 16:32:07 +10:00
Matt Westcott 39f7886a6f Split out common logic from get_value_data 2022-05-25 16:32:07 +10:00
Matt Westcott 5f890f0acc Extract common template_name / get_context / render_html methods 2022-05-25 16:32:07 +10:00
Matt Westcott acc20f866f Split out template_name and get_context from chooser subclasses 2022-05-25 16:32:07 +10:00
Matt Westcott 0f7a365bf8 Avoid calling super().render() in BaseChooser
This frees us up to redefine template_name and get_context in subclasses without it interfering with the rendering of the hidden input.
2022-05-25 16:32:07 +10:00
Matt Westcott e1386b629d rename BaseChooser.render_html to render_hidden_input 2022-05-25 16:32:07 +10:00
Matt Westcott f7110f009a Merge WidgetWithScript implementation into BaseChooser
This is a first step towards untangling the render / render_html inheritance
2022-05-25 16:32:07 +10:00
Matt Westcott 3c18ab3652 Add a new BaseChooser class and deprecate AdminChooser
This will allow us to make backwards-incompatible changes without breaking third-party packages that subclass AdminChooser
2022-05-25 16:32:07 +10:00
Matt Westcott 7b88c3ce02 Use AdminURLFinder for chooser widget edit buttons 2022-05-25 16:32:07 +10:00
Matt Westcott 9aa672c01c Add a get_value_data method to AdminTaskChooser for consistency with others 2022-05-25 16:32:07 +10:00
Matt Westcott e1ea42b3d6 Establish a consistent 'model' attribute for page/doc/image/snippet chooser widgets 2022-05-25 16:32:07 +10:00
Matt Westcott 386799af79 Move data-chooser-url attribute from template override to a context variable 2022-05-25 16:32:07 +10:00
Matt Westcott 7bcf452f8d Move chooser widget icon and classname from template overrides into context variables 2022-05-25 16:32:07 +10:00
Matt Westcott 45ac80bb89 Make cross-link URLs on generic model views optional
Normally, generic model views will be spun up through wagtail.admin.viewsets, which takes care of configuring the add_url_name / edit_url_name etc attributes to ensure that they are cross-linked appropriately. But if you're defining one in isolation, that's an unnecessary hoop to jump through, and the error messages if you don't specify them are fairly opaque. Fix this so that:

1. Non-essential cross-links (e.g. the Add button on the index view, and the Delete button on the edit view) are gracefully omitted if the URLs are undefined;
2. Essential cross-links (e.g. the destination of the redirect after a successful form submission) raise an informative error telling the developer what needs to be defined.
2022-05-25 16:31:12 +10:00
Matt Westcott 55fdafdfe6 Make radio buttons / checkboxes display vertically under Django 4.0
Fixes #8190
Django 4 changed the rendering of radio button / checkbox lists to nested divs rather than ul/li - see 5942ab5eb1. This change simply applies the existing li styles to second-level divs.
2022-05-25 08:31:11 +10:00
Matt Westcott 820c27fca9 lint fix for dialog.js
I'm guessing this was caused by #8541 and #8543 being merged in close succession...
2022-05-20 16:55:06 +01:00
Karl Hobley 25138aed92 Check that page.save_revision() was given a specific page object 2022-05-20 16:21:33 +01:00
LB (Ben Johnston) 7c9b6fd415
Cleanup - eslint config fixes (#8543)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 16:08:13 +01:00
Steve Stein 6343a9558c
Implement new reusable dialog component with a11y-dialog (#8541)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 15:02:32 +01:00
LB (Ben Johnston) 9f206d258c
Make it possible to reuse and customise Wagtail’s fonts with CSS variables. Fix #8406 (#8544)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 14:19:30 +01:00
LB (Ben Johnston) b817ed2fc4
Resolve npm audit fix items (#8358) 2022-05-20 13:50:06 +01:00
Sage Abdullah 93c9103d8a Use PostgreSQL 12 when testing against Django main 2022-05-20 12:18:20 +01:00
LB (Ben Johnston) 03ce6ea046
Add consistent header & subtitle classes across templates (#8368) 2022-05-20 11:53:10 +01:00
thoang43 2fbac52532 Documentation - Convert rst to md for ModelAdmin section
- Co-authored-by: Vu Pham
- relates to #8383
2022-05-20 08:32:21 +10:00
Karl Hobley 2a40333770 Set referer policy of upgrade notifcation to "strict-origin-when-cross-origin"
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
- Since Django 3.1, all Wagtail admin responses have been given a referer-policy: same-origin header. See: https://chipcullen.com/django-3-referrer-policy-change/
2022-05-19 08:37:25 +10:00
sag᠎e 52e5abfe62
Replace `PageRevision` with generic `Revision` model (#8441) 2022-05-17 11:46:30 +01:00
Matt Westcott 501b28c62b Fill in release date for 3.0 2022-05-16 14:20:37 +01:00
Matt Westcott ca03abc935 Fetch new translations from Transifex 2022-05-16 11:41:46 +01:00