# HG changeset patch # User Thierry Florac # Date 1548254330 -3600 # Node ID 5e43df29fe70e6ee43df82802ce0472e3961afb3 # Parent a4946af907b918ab73030dafbc04a924bbf16ec0 Removed control on required publication cancel form's comment diff -r a4946af907b9 -r 5e43df29fe70 src/pyams_content/shared/common/zmi/workflow.py --- 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')