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 pyramid.events import subscriber |
|
14 from zope.component.interfaces import ISite |
|
15 from zope.interface import implementer |
|
16 from zope.lifecycleevent.interfaces import IObjectAddedEvent |
|
17 |
|
18 from pyams_content.component.paragraph import IParagraphFactorySettings |
|
19 from pyams_content.shared.common.interfaces import ISharedContentFactory |
|
20 from pyams_content.shared.common.manager import SharedTool |
|
21 from pyams_content.shared.form import Form |
|
22 from pyams_content.shared.form.interfaces import FORM_CONTENT_TYPE, IFormsManager, \ |
|
23 IFormsManagerFactory |
|
24 from pyams_utils.adapter import adapter_config |
|
25 from pyams_utils.registry import utility_config |
|
26 from pyams_utils.traversing import get_parent |
|
27 |
|
28 |
13 __docformat__ = 'restructuredtext' |
29 __docformat__ = 'restructuredtext' |
14 |
30 |
15 |
31 |
16 # import standard library |
32 @implementer(IFormsManager, IParagraphFactorySettings) |
17 |
|
18 # import interfaces |
|
19 from pyams_content.shared.common.interfaces import ISharedContentFactory |
|
20 from pyams_content.shared.form.interfaces import IFormsManager, FORM_CONTENT_TYPE, IFormsManagerFactory |
|
21 from zope.component.interfaces import ISite |
|
22 from zope.lifecycleevent.interfaces import IObjectAddedEvent |
|
23 |
|
24 # import packages |
|
25 from pyams_content.shared.common.manager import SharedTool |
|
26 from pyams_content.shared.form import Form |
|
27 from pyams_utils.adapter import adapter_config |
|
28 from pyams_utils.registry import utility_config |
|
29 from pyams_utils.traversing import get_parent |
|
30 from pyramid.events import subscriber |
|
31 from zope.interface import implementer |
|
32 |
|
33 |
|
34 @implementer(IFormsManager) |
|
35 class FormsManager(SharedTool): |
33 class FormsManager(SharedTool): |
36 """Forms manager class""" |
34 """Forms manager class""" |
37 |
35 |
38 shared_content_type = FORM_CONTENT_TYPE |
36 shared_content_type = FORM_CONTENT_TYPE |
39 shared_content_menu = False |
37 shared_content_menu = False |