0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

13101 Commits

Author SHA1 Message Date
Stefan Hammer
d08295777d Add verbose_name_plural to Redirect to allow translation 2022-04-05 14:54:52 +01:00
Matt Westcott
16f839dfa7 Update deprecation warnings for new versions 2022-04-05 14:44:31 +01:00
Matt Westcott
45b55140f1 Use an inner class for BoundPanels, rather than side by side
Will hopefully make things easier to mentally parse, once things are using components properly
2022-04-05 14:16:07 +01:00
Matt Westcott
defa7f8ed2 Deprecate EditHandler.bind_to 2022-04-05 14:16:07 +01:00
Matt Westcott
c1655f5346 remove redundant mark_safe calls
render_to_string already returns a safestring
2022-04-05 14:16:07 +01:00
Matt Westcott
6e6ef3376c Remove bound-EditHandler methods from base EditHandler class 2022-04-05 14:16:07 +01:00
Matt Westcott
a2fc19ef2a Refactor out a BoundFormSubmissionsPanel class 2022-04-05 14:16:07 +01:00
Matt Westcott
d660333789 Refactor out a BoundCommentPanel class 2022-04-05 14:16:07 +01:00
Matt Westcott
0bfe36cf90 Refactor out a BoundPrivacyModalPanel class 2022-04-05 14:16:07 +01:00
Matt Westcott
1c9015c8ce Refactor out a BoundHelpPanel class 2022-04-05 14:16:07 +01:00
Matt Westcott
2fd7fe5ae6 Refactor out a BoundInlinePanel class 2022-04-05 14:16:07 +01:00
Matt Westcott
490e4299a7 Refactor out a distinct BoundPanelGroup class to replace the bound version of PanelGroup 2022-04-05 14:16:07 +01:00
Matt Westcott
eccf860f97 Refactor FieldPanel to return a distinct BoundFieldPanel object from bind_to
This creates an explicit demarcation between methods/properties that are only valid on fully bound panels (such as render_as_field) and those that should be called when only the model is bound (such as get_form_options). This surfaces two bugs where this was not enforced properly:

* in the create_log_entries_from_revisions scheduled task, we were calling get_comparison on an unbound EditHandler; we don't have a form or request to pass here, but we still need to call bind_to (with None for those values);
* BaseCompositeEditHandler overwrites its `children` attribute with the bound versions, so calling get_form_options is invalid after that point. Maintain distinct children and unbound_children attributes instead.
2022-04-05 14:16:07 +01:00
Matt Westcott
d1ae753a95 Rewrite FieldRowPanel column logic to not depend on on_instance_bound
This version avoids writing to the child's `classes` attribute, which a parent panel shouldn't be doing (and may become invalid shortly as we start delegating methods / properties between BoundPanel and EditHandler instances)
2022-04-05 14:16:07 +01:00
Matt Westcott
006f2b4add Remove support for binding request / instance / form separately in PanelGroup
All view code now passes all three parameters to bind_to, so we can make this a hard requirement and eliminate the distinct on_form_bound / on_request_bound / on_instance_bound handlers (because they're all triggered at the same time).
2022-04-05 14:16:07 +01:00
Matt Westcott
fae68ad8c8 Remove special case removing FieldPanels from PanelGroup if they're excluded from the form
The is_shown method on FieldPanel now detects this case instead.
2022-04-05 14:16:07 +01:00
Matt Westcott
470d39e1fe Split out bind_to(model) into a separate bind_to_model method 2022-04-05 14:16:07 +01:00
Matt Westcott
6a4c76ed53 Fix edit handler tests to bind model separately to instance/request/form 2022-04-05 14:16:07 +01:00
Matt Westcott
17032b9b25 Reorder edithandler binding for page views so that model is bound up-front, and request / instance / form are bound per request 2022-04-05 14:16:07 +01:00
Matt Westcott
5fe2554934 Refactor commenting forms to receive the user object on instantiation
Use the inherit_kwargs feature added to django-modelcluster in https://github.com/wagtail/django-modelcluster/pull/156 / https://github.com/wagtail/django-modelcluster/pull/157 to pass the for_user attribute from the root form to the comments formset; this means we don't have to construct a form class on the fly with the user embedded, and so don't need to bind to a request object before retrieving the form definition.
2022-04-05 14:16:07 +01:00
Matt Westcott
005eff033a Remove test_preview_with_custom_edit_handler
It's testing a workflow that's been superseded by #8060 and relies on binding the request before retrieving the form class, which won't be the case any more
2022-04-05 14:16:07 +01:00
Matt Westcott
5c55e09613 Update snippet views to bind instance, request and form at the same time 2022-04-05 14:16:07 +01:00
Matt Westcott
40f2fa0322 Update settings views to bind instance, request and form at the same time 2022-04-05 14:16:07 +01:00
Matt Westcott
83f373a91e Tweak modeladmin edithandler tests to bind model first 2022-04-05 14:16:07 +01:00
Matt Westcott
566aaf58fd Refactor workflow views to bind model first, and everything else per-request at the last moment 2022-04-05 14:16:07 +01:00
Matt Westcott
4e990c263b Refactor ModelAdmin views to bind model first, and everything else per-request at the last moment 2022-04-05 14:16:07 +01:00
Matt Westcott
782df5b195 Remove instance and request arguments from ModelAdmin.get_edit_handler 2022-04-05 14:16:07 +01:00
Matt Westcott
b9e088a3c6 Remove request argument from ModelAdmin.get_form_fields_exclude 2022-04-05 14:16:07 +01:00
dependabot[bot]
3d3407dea5 Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 06:49:15 +10:00
dependabot[bot]
79ad6b65c1 Bump minimist from 1.2.5 to 1.2.6 in /client/tests/integration
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 06:49:08 +10:00
saurabh
a641057fc2 fixed the errors in deploying.rst and i18n.rst 2022-04-04 06:48:02 +10:00
PaarthAgarwal
1d22985912 Fix issue where normalize.css would introduce font issues
- global font family on some elements set by normalize.css would override the desired font
- font stack was not correctly used across some elements
- fixes #8016
2022-04-03 22:27:09 +10:00
talkshrey
7f7fd15831 docs - fix spacing added between -m and http command
- see #8257
2022-04-03 22:12:04 +10:00
anujaraj
f3720a7652 Fix missing translations in workflow templates
- fixes #8214
- see #8240 & #8238
2022-04-03 22:03:50 +10:00
Scott Cranfill
a8b16b3a14
Convert icon SVG root elements from <symbol> to <svg> (#8222) 2022-04-02 00:32:10 +01:00
James Ray
2cae3083f5
Add missing lang attributes to <html> elements. Fix #8212 (#8220)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-01 23:50:47 +01:00
Harris Bard Lapiroff
1adc82c044
Add trimmed to blocktrans tags. Fix #8217 (#8226) 2022-04-01 23:16:51 +01:00
Jesse Menn
5eeb8cca40
Stop skipping heading levels in Wagtail welcome page (#8223)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-01 22:30:55 +01:00
Jesse Menn
6c9e90f6d4
Adds type attributes for some buttons (#8221) 2022-04-01 22:19:54 +01:00
Matt Westcott
113005aa05
Page description (#8164)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Co-authored-by: Kalob Taulien <kalob.taulien@gmail.com>
2022-04-01 22:16:41 +01:00
Thibaud Colas
34cd9e2aaa Code review cleanup 2022-04-01 17:01:26 -04:00
Karl Hobley
849ac514a2 Define gettext functions in an importable module 2022-04-01 17:01:26 -04:00
Karl Hobley
39d9f3f4a6 Enable Django's javascript catalog view 2022-04-01 17:01:26 -04:00
Karl Hobley
e8692b43de Commit initial version of extracted javascript strings 2022-04-01 17:01:26 -04:00
Karl Hobley
2b1d1d0749 Add a script to extract strings from javascript 2022-04-01 17:01:26 -04:00
Karl Hobley
1e884285a1 Replace STRINGS constants with gettext 2022-04-01 17:01:26 -04:00
Matt Westcott
b159404413
Update Saurabh kumar's name 2022-04-01 20:55:16 +01:00
Andy Chosak
00adeb8cf2 Fix bulk publishing of pages without revisions
Currently bulk publishing raises an error if you include pages that
exist in the database without any revisions. This commit ensures
that a revision exists before the page is published.

Fixes issue 8187.
2022-04-01 14:50:53 -04:00
Matt Westcott
30ad2ee217 Add Saurabh to contributors 2022-04-01 17:14:15 +01:00
Saurabh
a70aefe243
fixed punctuation issues and modified text in wagtail documentation. (#8262) 2022-04-01 17:12:57 +01:00