11 # |
11 # |
12 |
12 |
13 from zope.interface import alsoProvides, implementer, noLongerProvides, provider |
13 from zope.interface import alsoProvides, implementer, noLongerProvides, provider |
14 from zope.schema.fieldproperty import FieldProperty |
14 from zope.schema.fieldproperty import FieldProperty |
15 |
15 |
|
16 from pyams_content.component.paragraph import IParagraphContainerTarget |
16 from pyams_content.features.checker.interfaces import ERROR_VALUE, IContentChecker |
17 from pyams_content.features.checker.interfaces import ERROR_VALUE, IContentChecker |
17 from pyams_content.features.preview.interfaces import IPreviewTarget |
18 from pyams_content.features.preview.interfaces import IPreviewTarget |
18 from pyams_content.features.review.interfaces import IReviewTarget |
19 from pyams_content.features.review.interfaces import IReviewTarget |
19 from pyams_content.shared.common import IWfSharedContentFactory, SharedContent, WfSharedContent, WfSharedContentChecker, \ |
20 from pyams_content.shared.common import IWfSharedContentFactory, SharedContent, WfSharedContent, WfSharedContentChecker, \ |
20 register_content_type |
21 register_content_type |
27 __docformat__ = 'restructuredtext' |
28 __docformat__ = 'restructuredtext' |
28 |
29 |
29 from pyams_content import _ |
30 from pyams_content import _ |
30 |
31 |
31 |
32 |
32 @implementer(IWfForm, IFormFieldContainerTarget, |
33 @implementer(IWfForm, IFormFieldContainerTarget, IParagraphContainerTarget, |
33 IPreviewTarget, IReviewTarget) |
34 IPreviewTarget, IReviewTarget) |
34 class WfForm(WfSharedContent): |
35 class WfForm(WfSharedContent): |
35 """Base form""" |
36 """Base form""" |
36 |
37 |
37 content_type = FORM_CONTENT_TYPE |
38 content_type = FORM_CONTENT_TYPE |
38 content_name = FORM_CONTENT_NAME |
39 content_name = FORM_CONTENT_NAME |
39 |
40 |
|
41 form_header = FieldProperty(IWfForm['form_header']) |
|
42 alt_title = FieldProperty(IWfForm['alt_title']) |
40 user_title = FieldProperty(IWfForm['user_title']) |
43 user_title = FieldProperty(IWfForm['user_title']) |
41 auth_only = FieldProperty(IWfForm['auth_only']) |
44 auth_only = FieldProperty(IWfForm['auth_only']) |
42 form_header = FieldProperty(IWfForm['form_header']) |
|
43 submit_label = FieldProperty(IWfForm['submit_label']) |
45 submit_label = FieldProperty(IWfForm['submit_label']) |
44 submit_message = FieldProperty(IWfForm['submit_message']) |
46 submit_message = FieldProperty(IWfForm['submit_message']) |
45 _handler = FieldProperty(IWfForm['handler']) |
47 _handler = FieldProperty(IWfForm['handler']) |
46 use_captcha = FieldProperty(IWfForm['use_captcha']) |
48 use_captcha = FieldProperty(IWfForm['use_captcha']) |
47 client_captcha_key = FieldProperty(IWfForm['client_captcha_key']) |
49 client_captcha_key = FieldProperty(IWfForm['client_captcha_key']) |