From 74218a7e43f59b329cd7cd890245bcc2764beb3a Mon Sep 17 00:00:00 2001 From: Asanka Lihiniyagoda Date: Sun, 3 Feb 2019 22:17:51 +0530 Subject: [PATCH] Set data-focal-point-* values to be '' instead of 'None' when they are empty. --- CHANGELOG.txt | 1 + docs/releases/2.5.rst | 1 + wagtail/images/templates/wagtailimages/images/edit.html | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a0cb382204..0fec0ab8ec 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -23,6 +23,7 @@ Changelog * Fix: Added missing collection column specifier on document listing template (Sergey Fedoseev) * Fix: Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston)) * Fix: Admin HTML header now includes correct language code (Matt Westcott) + * Fix: Unclear error message when saving image after focal point edit (Hugo van den Berg) 2.4 (19.12.2018) diff --git a/docs/releases/2.5.rst b/docs/releases/2.5.rst index 332f084688..66831a8d0a 100644 --- a/docs/releases/2.5.rst +++ b/docs/releases/2.5.rst @@ -38,6 +38,7 @@ Bug fixes * Added missing collection column specifier on document listing template (Sergey Fedoseev) * Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston)) * Admin HTML header now includes correct language code (Matt Westcott) + * Unclear error message when saving image after focal point edit (Hugo van den Berg) Upgrade considerations diff --git a/wagtail/images/templates/wagtailimages/images/edit.html b/wagtail/images/templates/wagtailimages/images/edit.html index 8001940db6..e82b5f2e65 100644 --- a/wagtail/images/templates/wagtailimages/images/edit.html +++ b/wagtail/images/templates/wagtailimages/images/edit.html @@ -59,10 +59,10 @@
+ data-focal-point-x="{{ image.focal_point_x|default_if_none:'' }}" + data-focal-point-y="{{ image.focal_point_y|default_if_none:'' }}" + data-focal-point-width="{{ image.focal_point_width|default_if_none:'' }}" + data-focal-point-height="{{ image.focal_point_height|default_if_none:'' }}">