Use base paragraph edit forms
authorThierry Florac <thierry.florac@onf.fr>
Fri, 10 Nov 2017 11:57:19 +0100
changeset 258 ef411e4f8cb2
parent 257 429496aab23b
child 259 c09986c167bc
Use base paragraph edit forms
src/pyams_content/component/association/zmi/paragraph.py
--- a/src/pyams_content/component/association/zmi/paragraph.py	Fri Nov 10 11:56:59 2017 +0100
+++ b/src/pyams_content/component/association/zmi/paragraph.py	Fri Nov 10 11:57:19 2017 +0100
@@ -21,7 +21,7 @@
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
     IParagraphSummary
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_content.shared.common.interfaces import IWfSharedContent
 from pyams_form.interfaces.form import IInnerForm, IEditFormButtons
@@ -33,14 +33,13 @@
 # import packages
 from pyams_content.component.association.paragraph import AssociationParagraph
 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu
-from pyams_content.component.paragraph.zmi.container import ParagraphContainerView
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config, BaseContentProvider
-from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
+from pyams_zmi.form import AdminDialogAddForm
 from pyramid.view import view_config
 from z3c.form import field, button
 from zope.interface import implementer
@@ -48,7 +47,7 @@
 from pyams_content import _
 
 
-@viewlet_config(name='add-association-paragraph.menu', context=IParagraphContainerTarget, view=ParagraphContainerView,
+@viewlet_config(name='add-association-paragraph.menu', context=IParagraphContainerTarget, view=IParagraphContainerView,
                 layer=IPyAMSLayer, manager=IToolbarAddingMenu, weight=95)
 class AssociationParagraphAddMenu(BaseParagraphAddMenu):
     """Associations paragraph add menu"""
@@ -86,7 +85,7 @@
 
 @pagelet_config(name='properties.html', context=IAssociationParagraph, layer=IPyAMSLayer,
                 permission=MANAGE_CONTENT_PERMISSION)
-class AssociationParagraphPropertiesEditForm(AdminDialogEditForm):
+class AssociationParagraphPropertiesEditForm(BaseParagraphPropertiesEditForm):
     """Association paragraph properties edit form"""
 
     @property