--- a/src/pyams_content/shared/common/zmi/workflow.py Tue Jan 22 15:48:14 2019 +0100
+++ b/src/pyams_content/shared/common/zmi/workflow.py Wed Jan 23 15:38:50 2019 +0100
@@ -23,6 +23,7 @@
from zope.lifecycleevent import ObjectModifiedEvent
from zope.schema import Bool
+from pyams_content import _
from pyams_content.features.preview.interfaces import IPreviewTarget
from pyams_content.interfaces import CREATE_VERSION_PERMISSION, MANAGE_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION
from pyams_content.shared.common.interfaces import IBaseSharedTool, IContributorRestrictions, IManagerRestrictions, \
@@ -51,8 +52,6 @@
from pyams_workflow.zmi.transition import WorkflowContentTransitionForm
from pyams_zmi.form import InnerAdminAddForm
-from pyams_content import _
-
#
# Generic transition info
@@ -419,14 +418,6 @@
buttons = button.Buttons(IPublicationCancelButtons)
-@subscriber(IDataExtractedEvent, form_selector=PublicationCancelForm)
-def handle_publication_cancel_form_data_extraction(event):
- """Handle publication cancel form data extraction"""
- comment = (event.data.get('comment') or '').strip()
- if not comment:
- event.form.widgets.errors += (Invalid(_("A comment is required")),)
-
-
@viewlet_config(name='wf-cancel-message', context=IWfSharedContent, layer=IPyAMSLayer,
view=PublicationCancelForm, manager=IWidgetsPrefixViewletsManager, weight=20)
@template_config(template='templates/wf-cancel-publish-message.pt')