8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
10 # FOR A PARTICULAR PURPOSE. |
10 # FOR A PARTICULAR PURPOSE. |
11 # |
11 # |
12 |
12 |
|
13 from zope.annotation.interfaces import IAttributeAnnotatable |
|
14 from zope.container.constraints import containers, contains |
|
15 from zope.container.interfaces import IContained, IContainer |
|
16 from zope.interface import Attribute, Interface |
|
17 from zope.schema import Bool, Choice, TextLine |
|
18 |
|
19 from pyams_content.shared.common.interfaces import ISharedContent, ISharedToolPortalContext, \ |
|
20 IWfSharedContentPortalContext |
|
21 from pyams_i18n.schema import I18nTextField, I18nTextLineField |
|
22 from pyams_utils.schema import MailAddressField, TextLineListField |
|
23 |
|
24 |
13 __docformat__ = 'restructuredtext' |
25 __docformat__ = 'restructuredtext' |
14 |
26 |
|
27 from pyams_content import _ |
15 |
28 |
16 # import standard library |
|
17 |
|
18 from zope.annotation.interfaces import IAttributeAnnotatable |
|
19 from zope.container.constraints import containers, contains |
|
20 from zope.container.interfaces import IContainer, IContained |
|
21 from zope.interface import Interface, Attribute |
|
22 from zope.schema import TextLine, Choice, Bool |
|
23 |
|
24 from pyams_content import _ |
|
25 # import interfaces |
|
26 from pyams_content.shared.common.interfaces import ISharedContent, IWfSharedContentPortalContext, \ |
|
27 ISharedToolPortalContext |
|
28 # import packages |
|
29 from pyams_i18n.schema import I18nTextLineField, I18nTextField |
|
30 from pyams_utils.schema import MailAddressField, TextLineListField |
|
31 |
29 |
32 FORM_CONTENT_TYPE = 'form' |
30 FORM_CONTENT_TYPE = 'form' |
33 FORM_CONTENT_NAME = _('Form') |
31 FORM_CONTENT_NAME = _('Form') |
34 |
32 |
35 FORM_FIELD_CONTAINER_KEY = 'pyams_content.shared.form_fields' |
33 FORM_FIELD_CONTAINER_KEY = 'pyams_content.shared.form_fields' |
41 |
39 |
42 class IFormsManagerFactory(Interface): |
40 class IFormsManagerFactory(Interface): |
43 """Forms manager factory interface""" |
41 """Forms manager factory interface""" |
44 |
42 |
45 |
43 |
46 class IFormField(IContained): |
44 class IFormField(IContained, IAttributeAnnotatable): |
47 """Form field interface""" |
45 """Form field interface""" |
48 |
46 |
49 containers('.IFormFieldContainer') |
47 containers('.IFormFieldContainer') |
50 |
48 |
51 name = TextLine(title=_("Field name"), |
49 name = TextLine(title=_("Field name"), |