Wykres commitów

2621 Commity (0ee07dddffe613d12b32bc92e4979873c822ce0c)

Autor SHA1 Wiadomość Data
Samir Shah 0ee07dddff Fix pageurl and slugurl handling of situations where request.site is null (#5501) 2019-08-14 12:07:12 +01:00
Andy Chosak 7c3418f99e Properly check permissions when viewing revisions (#5490)
Currently any user with any page permission can view any page revision.
This commit fixes that, and ensures that the user has publish or edit
permission on the page before showing a page revision. If not, the user
is presented with a 403.

This maintains the current behavior if the user has no page permissions,
which is to redirect to the admin home page.

New tests have been added to cover these changes.

Fixes issue 5426.
2019-08-12 16:22:28 +01:00
Andy Chosak 52b01cda67 Don't use page admin title when editing rich text (#5491)
When editing a rich text field and entering a link to a page whose Page
type overrides get_admin_display_title, the custom admin display title
is used both when browsing to select the page to link to and also when
viewing the rich text editor.

The first behavior is consistent with how custom admin display titles
are used throughout the admin, but the second behavior is not. The
Wagtail user should be able to use the rich text field as a reasonable
preview of what the rendered content will look like for the end user. To
do this, the "real" page title should be used, not the admin one.

This commit alters the data that gets passed to the rich text editor so
that its title is the real page title and not the admin one.

Fixes issue 5131.
2019-08-12 16:10:25 +01:00
Matt Westcott ada652f19f Release note for #5427 2019-08-08 12:54:37 +01:00
Matt Westcott 311c007656 Deprecation note for dummy_request 2019-08-08 12:50:39 +01:00
Martey Dodoo bb4e2fe2df Add labels to snippet bulk edit checkboxes for screen reader users. Fix #5328 (#5463) 2019-08-05 18:12:08 +01:00
Matt Westcott 6bc94ee56d Fill in release date for 2.6.1 2019-08-05 15:18:38 +01:00
Thibaud Colas 3710d1d6b2
Clarify CHANGELOG instructions in "Committing code" docs (#5483) 2019-08-05 13:35:29 +01:00
Jonny Scholes c0af26b076 Move and refactor upgrade notification JS 2019-08-04 17:39:55 +10:00
Neal Todd 4a93424654 Prevent exception when attempting to delete a model with a protected 1-to-1 relation
Modeladmin handles notification to the user if a model instance has protected ForeignKey
relationships. However, if the protected relation is a OneToOneField it raises an exception:

  File ".../wagtail/wagtail/contrib/modeladmin/views.py", line 742, in post
    for obj in qs.all():
AttributeError: 'MyRelatedModel' object has no attribute 'all'

because qs in this case is the related instance rather than a queryset of related instances
(as is the case for a ForeignKey).

This commit handles the OneToOneField case as well.
2019-08-04 17:20:41 +10:00
Matt Westcott cdb13b6490 Add release notes for 2.6.1 2019-08-02 17:34:20 +01:00
Iman Syed d3f720995a Make image fallback work for images with big/small aspect ratios. Fix #5472 (#5474) 2019-08-01 11:46:34 +01:00
Matt Westcott 29741f57af Fill in release date for 2.6 2019-08-01 10:47:07 +01:00
Matt Westcott 4767557217 Fill in release date for 2.5.2 2019-08-01 10:46:33 +01:00
Matt Westcott d75754a19b Add release notes for 2.5.2 2019-07-30 14:08:52 +01:00
Thibaud Colas db9b582912 Delay dirty form check data snapshot to avoid race conditions. Fix #4978 (#5469)
User interaction with the form within the 10s delay also won’t trigger the confirmation message. There will still be race condition issues if form widgets like rich text take 10+ seconds to initialise – but that doesn’t seem likely.
2019-07-30 12:45:11 +01:00
Catherine Farman f53dd95696 Change StreamField group labels color so labels are visible. Fix #5455 (#5462)
* use lighter grey for streamfield group label for accessible contrast
2019-07-26 16:39:11 -04:00
Rodrigo 1a2bf525f2 Add https support for scribd oembed provider (#739)
Currently scribd defaults to https for their sharing links - http still works but if you copy&paste quickly you may think it's broken
2019-07-25 14:19:07 +01:00
Matt Westcott 1468cab3a1 Release note for #5431 2019-07-25 10:46:41 +01:00
Daniele Procida 72db52371a Updated feature detection notes 2019-07-21 18:03:09 +10:00
Michael van Tellingen 9cd2fc2c82 Add a `construct_page_listing_buttons` hook
This hook mimics the functiolity provided by `construct_page_action_menu`
in that it constructs the final list of buttons to be shown in the wagtail
admin interface.  This means that within this function button's can be
removed, added or re-ordered.

See #4925
2019-07-21 17:40:26 +10:00
Tom Dyson 6d7a82cfb2 Fix update docs typo
Only two Ss in accessor. Also make quotes consistent.
2019-07-09 17:50:24 +01:00
Matt Westcott 772b76ef00 Add 2.7 section to changelog and release notes 2019-07-09 16:51:48 +01:00
Fidel Ramos baee103024 Optimize admin.navigation.get_explorable_root_page
Testing the queryset in the if clause was causing the whole queryset
to be retrieved and populated from DB, all to check whether it was empty
or not.

The optimization is to rely on the strict behavior of
first_common_ancestor, which raises an exception if the queryset is
empty.
2019-07-09 11:57:40 +01:00
Andrew Miller b9816d194a Don't make assumptions about the username field
The USERNAME_FIELD exists to allow customisation. Therefore we should make an assumption that `.username` exists on the model. Instead, we need to pull the required value from the USERNAME_FIELD and add in a fallback default.
2019-07-08 20:11:14 +01:00
William Blackie 3754d34caa Search query normalisation no longer removes punctuation #5416 2019-07-04 16:53:27 +01:00
Michael Hearn 10bbfec93c Also add change event to timepicker and datepicker 2019-07-03 16:10:41 +01:00
Jonny 851bd5f24d Added missing is_stored_locally() to AbstractDocument 2019-07-03 15:53:51 +01:00
Matt Westcott 7a47bfc9a7 Document the workaround for broken wagtailimages.Filter references in custom image migrations 2019-07-03 12:10:04 +01:00
Jaroslaw Zabiello 7df817d29c Update third_party_tutorials.rst
Add a detailed article about using GraphQL in Wagtail
2019-06-25 16:07:06 +01:00
Tom Dyson ff850026e8 Adjust link label 2019-06-25 12:10:34 +01:00
Tom Dyson 08a301b3ce Clarify new three month release policy 2019-06-25 12:10:34 +01:00
jordan_bauer 0dac8f0764 added construction_hook_name to settings_menu (#5384) 2019-06-25 12:04:53 +01:00
Helen Chapman 6ec4ae0c32 Add screen-reader labels across multiple parts of the UI (#5274, #5339, #5372) 2019-06-21 16:29:00 +01:00
Helen Chapman 1e85ff454c Move focus to the pages explorer menu when open (#5336, #5394)
* Ensure that when you open the explorer the focus moves to the first link of the menu, and add a label for the explorer navigation
* Add dialog role to pages explorer popup, and ensure that there is an option to close the dialog window when tabbing by making the close button visually hidden rather than display none
2019-06-20 18:02:28 +01:00
Helen Chapman 28cdf9c212 Improve screen-reader labels for action links in page listing (#5274, #5380) 2019-06-20 17:33:18 +01:00
Andy Babic af415c7d19 Release notes for #5203 2019-06-20 16:33:09 +01:00
Karl Hobley d008cc7e21 Implement Page.with_content_json and add to docs (fixes #5199) 2019-06-20 16:24:04 +01:00
Andy Babic 11af8123f7 Release notes for #5183 2019-06-20 16:06:59 +01:00
Thibaud Colas e2f14057a4
Add dedicated accessibility section to v2.6 release notes (#5402) 2019-06-19 17:31:20 +01:00
Helen Chapman e33732cc63 Add more contextual information for screen readers in the explorer menu’s links (#5335, #5386) 2019-06-19 15:19:41 +01:00
Fidel Ramos 41f80af5db Optimization of UserPagePermissionsProxy.revisions_for_moderation (#5311)
revisions_for_moderation() was iterating over Page instances only
to use their path attribute. The optimization uses values_list()
over the GroupPagePermission queryset to retrieve only the page
paths without having to create the model instances in memory. This
saves roughly 50% of the runtime.
2019-06-18 20:14:54 +01:00
Helen Chapman 4a1f26778f Add labels to permission checkboxes for screen reader users (#5329, #5395)
- adds a fieldset around checkboxes with the same name
- add correct labels for object permissions table
- Ensure that image and document permissions labels display correctly, and ensure that labels for the dropdowns for document and image collections are not display:none
- Hide labels from sighted users in group edit / group add pages
2019-06-18 18:23:36 +01:00
jordan-bauer 998440cfa9 Remove buggy tab order customisations in CMS admin (#5383, #5351) 2019-06-18 12:49:16 +01:00
Helen Chapman 98d3ef4743 Ensure the 'add child page' button displays when focused (#5274, #5382) 2019-06-17 18:11:04 +01:00
Helen Chapman 4b4db7d771 Adds screen-reader-only text to the close button for modals (#5274, #5377)
* Adds clearer text to the close button for modals
* Use existing wagtailConfig.STRINGS to store the new translatable string for JS, rather than introducing a new library.
* Update list of string constants for translation in the tests file
* Remove aria-hidden on modal dialog close button
2019-06-17 15:56:48 +01:00
Matt Westcott 77a3bf60ca Add form media to users/edit.html (#5390) 2019-06-17 15:12:02 +01:00
Eric Dyken eba3357fd4 Adds Collections section to editor's guide 2019-06-17 10:13:49 +01:00
Andy Babic fdd8ddc2b1 Release notes for #5373 2019-06-13 13:56:49 +01:00
Thibaud Colas 4349c6c4dd Add release notes for #5356 2019-06-12 18:31:32 +01:00