Force full reload when title is modified so that breadcrumbs are correctly updated
--- a/src/pyams_content/shared/common/zmi/properties.py Tue Sep 17 15:25:26 2019 +0200
+++ b/src/pyams_content/shared/common/zmi/properties.py Tue Sep 17 15:33:20 2019 +0200
@@ -10,8 +10,6 @@
# FOR A PARTICULAR PURPOSE.
#
-__docformat__ = 'restructuredtext'
-
from pyramid.events import subscriber
from z3c.form import field
from z3c.form.interfaces import HIDDEN_MODE, IDataExtractedEvent
@@ -38,6 +36,9 @@
from pyams_zmi.interfaces.menu import IContentManagementMenu, IPropertiesMenu
from pyams_zmi.layer import IAdminLayer
+
+__docformat__ = 'restructuredtext'
+
from pyams_content import _
@@ -102,7 +103,7 @@
updated = changes.get(IBaseContent, ())
if 'title' in updated:
return {
- 'status': 'reload',
+ 'status': 'redirect',
'message': self.request.localizer.translate(self.successMessage)
}
else:
@@ -124,7 +125,8 @@
data['content_url'] = generate_url(data['content_url'])
-@adapter_config(context=(IWfSharedContent, IAdminLayer, SharedContentPropertiesEditForm), provides=IPageHeader)
+@adapter_config(context=(IWfSharedContent, IAdminLayer, SharedContentPropertiesEditForm),
+ provides=IPageHeader)
class SharedContentPropertiesHeaderAdapter(WfSharedContentHeaderAdapter):
"""Shared content properties header adapter"""