0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
Matt Westcott
eaad013081 Output form media on add/edit/chooser image forms with custom models
* Add tests for custom image on multiple image uploader
* Output form media on image add/edit views
* Output form media for 'add image' form within image chooser modal
Note: this won't work reliably if the media is hosted on a CDN, because script tags inserted as part of a jQuery DOM insertion (as modals are) are loaded asynchronously and not guaranteed to complete loading before inline scripts are run. It's better than not having the includes there at all though...
2019-08-18 15:20:03 +10:00
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
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
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
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
Matt Westcott
772b76ef00 Add 2.7 section to changelog and release notes 2019-07-09 16:51:48 +01:00