diff -r c69e5c38e92c -r 6136a9a4f380 src/pyams_workflow/interfaces.py --- a/src/pyams_workflow/interfaces.py Thu May 23 16:47:00 2019 +0200 +++ b/src/pyams_workflow/interfaces.py Fri May 24 08:45:15 2019 +0200 @@ -12,21 +12,16 @@ __docformat__ = 'restructuredtext' - -# import standard library - -# import interfaces -from pyams_utils.interfaces import VIEW_PERMISSION from zope.annotation.interfaces import IAttributeAnnotatable +from zope.interface import Attribute, Interface, Invalid, implementer, invariant from zope.interface.interfaces import IObjectEvent, ObjectEvent +from zope.lifecycleevent import ObjectCreatedEvent from zope.lifecycleevent.interfaces import IObjectCreatedEvent +from zope.schema import Bool, Choice, Datetime, Int, List, Object, Set, Text, TextLine +from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary -# import packages from pyams_security.schema import Principal -from zope.interface import implementer, invariant, Interface, Attribute, Invalid -from zope.lifecycleevent import ObjectCreatedEvent -from zope.schema import Choice, Datetime, Set, TextLine, Text, List, Object, Int, Bool -from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm +from pyams_utils.interfaces import VIEW_PERMISSION from pyams_workflow import _ @@ -201,6 +196,9 @@ """Get transition with transition_id""" +WORKFLOWS_VOCABULARY = 'PyAMS workflows' + + class IWorkflowInfo(Interface): """Get workflow info about workflowed object, and drive workflow. @@ -373,7 +371,7 @@ workflow_name = Choice(title=_("Workflow name"), description=_("Name of workflow utility managing this content"), required=True, - vocabulary='PyAMS workflows') + vocabulary=WORKFLOWS_VOCABULARY) view_permission = Choice(title=_("View permission"), description=_("This permission will be required to display content"),