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

13791 Commits

Author SHA1 Message Date
Sage Abdullah
32b5b992b3 Clear existing preview data on initial load of the create/edit view
This prevents stale preview data from being initially shown after reloading the PreviewOnCreate view
- fixes #9058
2022-08-21 08:25:34 +10:00
LB Johnston
85b79dc532 add changelog for #9056 2022-08-21 07:34:58 +10:00
Matt Westcott
c91a272541 Only show locale filter in choosers when i18n is enabled in settings
Fixes #9038
2022-08-21 07:33:47 +10:00
LB Johnston
ca9ded873e update changelog for #9037 2022-08-21 07:20:01 +10:00
Sage Abdullah
d71a7ccdd4 Add links to topic guide from mixin reference docs 2022-08-21 07:18:27 +10:00
Sage Abdullah
4d27fd1f54 Add docs for saving draft changes of snippets 2022-08-21 07:18:27 +10:00
Sage Abdullah
9407be3d24 Add docs for saving revisions of snippets 2022-08-21 07:18:27 +10:00
Sage Abdullah
a3255c1ee9 Add docs for making snippets previewable 2022-08-21 07:18:27 +10:00
Sage Abdullah
cc0e14c38d Improve snippets usage guide
- Use sentence case for headers in snippets usage guide
- Fix broken link to Django custom template tags
2022-08-21 07:18:27 +10:00
LB (Ben Johnston)
4fb000bb19
add contributor for #9060 2022-08-20 23:18:19 +10:00
Mehrdad Moradizadeh
739096d426 fixing a typo in the documentation 2022-08-20 23:17:05 +10:00
LB Johnston
95ca38332e update readme screenshot for Wagtail 4.0
- resolves #8997
2022-08-19 11:31:45 +01:00
Matt Westcott
5ec55fd474 Release note for #8973 in 4.0 2022-08-19 11:29:56 +01:00
Matt Westcott
5713d57692 Release notes for #8940 and #8973 in 3.0.2 2022-08-19 11:29:49 +01:00
Matt Westcott
f0014df781 Fix updatemodulepaths for Python 3.7
Fixes #8970. Python 3.7 incorrectly opens the stream for writing in text mode (be6dbfb43b), so work around this by writing the unicode string back rather than encoding back to bytes.

This will probably fail if we're on Windows AND Python 3.7 AND encounter non-ASCII characters (because in that case it'll be open for writing as Windows-1252 encoding), but it's probably the best we can do without abandoning the fileinput library entirely.
2022-08-19 11:19:27 +01:00
PaarthAgarwal
520dfa8005 Ensure screen readers are made aware of page level messages
- when added dynamically to the top of the page
- already added to the authentication pages via #8925
2022-08-19 17:48:18 +10:00
Matt Westcott
1504eb7812 Fix dead Transifex links 2022-08-19 17:28:31 +10:00
Sage Abdullah
b20a64f13b Fix live preview error banner overlapping with preview mode selector 2022-08-18 12:39:46 +01:00
Matt Westcott
f37380bea4 Fetch new strings from Transifex 2022-08-18 12:33:04 +01:00
Matt Westcott
bb343e7524 Rebuild translation strings following #9042 2022-08-18 12:15:30 +01:00
Matt Westcott
e0fd8e1a47 Fix plural handling for "no permission to delete these snippets" errors
`./manage.py compilemessages` does not allow variables to differ between the singular and plural forms - it fails with

    a format specification for argument 'snippet_type_name', as in 'msgstr[0]', doesn't exist in 'msgid_plural'

It's not possible to use the gettext pluralisation mechanism properly here, because we're using Django's verbose_name and verbose_name_plural properties which don't cover the requirements of languages with complex pluralisation rules. Since we can only hope to support English-style (`if n == 1`) pluralisation, use an n==1 test directly (as we have elsewhere in the template) rather than trying to shoehorn this into gettext pluralisation.

While we're at it, remove the capitalisation of the snippet name - it makes no sense here (especially when only done for the plural).
2022-08-18 12:08:46 +01:00
Sage Abdullah
df7031f9ae Explicitly specify get_preview_template and get_preview_context parameters 2022-08-18 10:13:57 +01:00
Thibaud Colas
f7ecdaaf78 Upgrade to latest Draftail RC, fixing command palette selection issue 2022-08-18 10:01:57 +01:00
Matt Westcott
323dfe49e9 Fix error insertion logic for modal upload forms
Fixes #9019

* The `[data-field]` element (not the input) should be queried to find the `[data-field-errors]` element
* The code should not assume the presence of an icon element
2022-08-18 09:32:21 +01:00
Thibaud Colas
1fcf4cacbb
Add more items to 4.0 release notes (#9032) 2022-08-18 08:47:30 +01:00
Matt Westcott
9aeb2e3e49 Ensure telepath adapter gets registered for document chooser widget
Fixes #9010. `wagtail.documents.widgets` is no longer reliably imported on startup now that the chooser widget is constructed within wagtail.documents.views.chooser instead, so the telepath adapter wasn't getting register. This meant that DocumentChooserBlocks in StreamField were using the base chooser implementation, which didn't include customisations such as populating the title field from the file upload field. Fix this by making ChooserViewSet responsible for registering the telepath adapter.
2022-08-17 18:24:18 +01:00
Matt Westcott
cc4675aa5e Use correct classnames for showing/hiding edit button on chooser widget
Fixes #9008
2022-08-17 07:50:29 +10:00
Stefan Hammer
3bf4a0693c Fixed init method of legacy BaseSetting class
The "return" statement was only a minor improvement, the breaking code was the passed "self" argument.

- fixes #8996
- fixes #9006
2022-08-17 07:45:31 +10:00
Matt Westcott
b4bc681865 Fix DocumentChooserBlock deconstruction for custom document models
Fixes #8989. The previous fix #9004 failed for custom document models because ChooserViewset assigns an internal name for the ChooserBlock class based on the model name, and if this is anything other than Document it won't match the name DocumentChooserBlock that it's exposed under in wagtail.documents.blocks. Fix this by replacing the `block_class` property with a `get_block_class` method that lets us specify the class name. As a bonus, user code that defines chooser blocks no longer has to directly hack the `__module__` attribute.
2022-08-16 20:50:04 +01:00
Matt Westcott
b740df734a Add missing chevron-down.svg
Fixes #8988
2022-08-16 19:40:44 +01:00
LB Johnston
666cc5e8e5 fix up legacy release note refs & use consistent format
- fix some broken refs that were lost in the migration to markdown files
- use lower_snake_case for all internal refs (most follow this convention)
- release process sub-section in docs should be named release schedule instead
2022-08-16 12:42:42 +01:00
LB Johnston
401e84dfd9 fix various typos and backtick usage in 4.0 changelog/release notes
- adds a ref to the new setting added for `WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT` - see #8703
2022-08-16 12:36:46 +01:00
LB Johnston
23ee3d8924 add changelog for #9000 2022-08-16 07:58:28 +10:00
Sage Abdullah
e4509f3432 Improve Revision model docs 2022-08-16 07:58:28 +10:00
Sage Abdullah
e864b9c4d1 Add docs for PreviewableMixin 2022-08-16 07:58:28 +10:00
Sage Abdullah
fb6ec3ad00 Add docs for DraftStateMixin 2022-08-16 07:58:28 +10:00
Sage Abdullah
cf3cea9a5b Add docs for RevisionMixin 2022-08-16 07:58:28 +10:00
Sage Abdullah
3151200288 Improve Page model reference documentation
- Use inline code for `Locale` and `TranslatableMixin` headers to be consistent with other classes in the page
- Move `locale` and `translation_key` of `TranslatableMixin` to its own "Database fields" section
- Add missing periods in Page.update_aliases parameter description
2022-08-16 07:58:28 +10:00
LB Johnston
92204aa0bb add changelog for #8993 & #9005 2022-08-16 07:37:30 +10:00
PaarthAgarwal
011099dd45 fixed console error for breadcrumbs 2022-08-16 07:35:23 +10:00
Matt Westcott
8564383ef5 remove stray console-log from page-editor.js 2022-08-16 06:13:30 +10:00
Matt Westcott
a6a94a9a04 Ensure DocumentChooserBlock can be deconstructed for migrations
Fixes #8989. Now that DocumentChooserBlock is constructed dynamically via wagtail.documents.viewsets.chooser, we need to explicitly set its `__module__` attribute so that the result of calling `deconstruct()` for migrations points back to the wagtail.documents.blocks module.

Also update the documentation for defining custom choosers, and add tests for deconstructing the other chooser blocks.
2022-08-15 15:38:54 -04:00
Matt Westcott
5ff6922eb5 Update CONTRIBUTORS.rst with new translators 2022-08-12 14:55:07 +01:00
Matt Westcott
a568b59808 Generate new strings for translation 2022-08-12 14:07:32 +01:00
Matt Westcott
9ee67a5fef Fetch new translations from Transifex 2022-08-12 14:06:14 +01:00
Matt Westcott
f24bccc3df Set BaseSetting deprecation to 5.0 2022-08-12 13:49:09 +01:00
Thibaud Colas
ca7f23d176
Update InlinePanel and StreamField styles for new designs (#8983) 2022-08-12 13:17:40 +01:00
Sage Abdullah
6d3ea0cb3e Add unpublish view and action menu item for snippets with DraftStateMixin 2022-08-12 14:00:59 +02:00
Sage Abdullah
2d23aea9bd Create new UnpublishView for reuse outside of pages 2022-08-12 14:00:59 +02:00
LB (Ben Johnston)
6a11ae711a
Only use hidden until-found in panels if browsers supports it (#8962) 2022-08-12 12:19:48 +01:00