Dan Swain
b53f12d394
Include missing import of FieldPanel
2022-05-28 06:40:25 +10:00
Thiago Costa de Souza
e6865e7b0f
documentation - migrate advanced_topics/customisation/** to md
2022-05-27 08:02:16 +10:00
Thiago Costa de Souza
4424d23fa4
documentation - migrate advanced_topics/images/** to md
2022-05-27 07:51:45 +10:00
LB Johnston
52e87968e2
fix up changelog entry for #7752
...
- release number is the same but the link is now adaptive
2022-05-27 07:25:30 +10:00
Tibor Leupold
4f5d688021
Add ability for upgrade notification to show the relevant release to the user
...
This now implements the logic to link to the next minor's release notes
when such a version difference is computed. If a patch release
difference is computed, then those release notes are linked.
The utils.tests.js seemed a bit unexpected location, because there is no
`utils.js` module. Now the module defining the tests and the one
defining the functionality are named similarly, as is common in the rest
of the code base.
- resolves #7336
- resolves #7405
- resolves #3938
- fixes #8537
Fix issue where upgrade notification was not using translated content.
2022-05-26 19:57:46 +10:00
sage
f4d5207fbd
Use `GenericForeignKey` and `GenericRelation` for `Revision` ( #8571 )
2022-05-26 00:08:30 +01:00
Hitansh Shah
f8a7c6f4ae
Added functionality in bulk actions: ability to use shift+click to select multiple items at once
...
- Signed-off-by: Hitansh Shah <shah.hitanshsanjay.mat20@itbhu.ac.in>
- resolves #8490
2022-05-25 21:45:12 +10:00
Thiago Costa de Souza
7e73349dc1
documentation - migrate api section to markdown
2022-05-25 21:01:38 +10:00
Stefan Hammer
906dfa2773
Added missing gettext calls to the CommentComponent
2022-05-25 20:45:09 +10:00
LB Johnston
4a07779ca5
fix testapp migrations broken in #7897
2022-05-25 20:34:57 +10:00
Matt Westcott
5994cc43df
Allow passing arbitrary link attributes to TitleColumn
2022-05-25 20:10:47 +10:00
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