Updated cancel button's type in paragraphs inner edit forms
authorThierry Florac <thierry.florac@onf.fr>
Mon, 08 Oct 2018 13:47:23 +0200
changeset 1002 ab7787b3faf1
parent 1001 ad63fa80bb49
child 1003 cdc5d7aa9387
Updated cancel button's type in paragraphs inner edit forms
src/pyams_content/component/association/zmi/paragraph.py
src/pyams_content/component/gallery/zmi/paragraph.py
src/pyams_content/component/illustration/zmi/paragraph.py
src/pyams_content/component/keynumber/zmi/paragraph.py
src/pyams_content/component/paragraph/zmi/__init__.py
src/pyams_content/component/paragraph/zmi/audio.py
src/pyams_content/component/paragraph/zmi/contact.py
src/pyams_content/component/paragraph/zmi/frame.py
src/pyams_content/component/paragraph/zmi/header.py
src/pyams_content/component/paragraph/zmi/html.py
src/pyams_content/component/paragraph/zmi/keypoint.py
src/pyams_content/component/paragraph/zmi/map.py
src/pyams_content/component/paragraph/zmi/milestone.py
src/pyams_content/component/paragraph/zmi/pictogram.py
src/pyams_content/component/paragraph/zmi/verbatim.py
src/pyams_content/component/paragraph/zmi/video.py
src/pyams_content/component/video/zmi/paragraph.py
src/pyams_content/shared/imagemap/zmi/paragraph.py
src/pyams_content/shared/logo/zmi/paragraph.py
--- a/src/pyams_content/component/association/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/association/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -31,7 +31,7 @@
 # import packages
 from pyams_content.component.association.paragraph import AssociationParagraph
 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons, IParagraphInnerEditFormButtons
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_form.form import ajax_config
 from pyams_pagelet.pagelet import pagelet_config
@@ -111,7 +111,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/gallery/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/gallery/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -26,7 +26,7 @@
 from pyams_content.component.gallery.zmi.interfaces import IGalleryContentsView
 from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget
 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons, ParagraphContainerTable, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, ParagraphContainerTable, \
     get_json_paragraph_refresh_event
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
@@ -111,7 +111,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/illustration/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -13,21 +13,19 @@
 __docformat__ = 'restructuredtext'
 
 from transaction.interfaces import ITransactionManager
-from z3c.form import field, button
+from z3c.form import button, field
 from z3c.form.interfaces import INPUT_MODE
 from zope.interface import implementer
 
-from pyams_content import _
-from pyams_content.component.illustration.interfaces import IIllustrationTarget, IIllustration, \
-    IIllustrationParagraph, ILLUSTRATION_PARAGRAPH_TYPE
-# import packages
+from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationParagraph, IIllustrationTarget, \
+    ILLUSTRATION_PARAGRAPH_TYPE
 from pyams_content.component.illustration.paragraph import Illustration
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, \
-    IParagraphContainer
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget
 from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_refresh_event, IParagraphEditFormButtons
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView, \
-    IParagraphContainerTable, IParagraphTitleToolbar
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_refresh_event
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerTable, IParagraphContainerView, \
+    IParagraphInnerEditor, IParagraphTitleToolbar
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_form.form import ajax_config
@@ -39,9 +37,11 @@
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
-from pyams_viewlet.viewlet import viewlet_config, Viewlet
+from pyams_viewlet.viewlet import Viewlet, viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
 
+from pyams_content import _
+
 
 #
 # Illustration
@@ -119,7 +119,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/keynumber/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/keynumber/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,35 +12,31 @@
 
 __docformat__ = 'restructuredtext'
 
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer
-from pyams_content.component.keynumber.interfaces import KEYNUMBER_PARAGRAPH_TYPE, IKeyNumberParagraph
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.keynumber.interfaces import IKeyNumberParagraph, KEYNUMBER_PARAGRAPH_TYPE
+from pyams_content.component.keynumber.paragraph import KeyNumberParagraph
+from pyams_content.component.keynumber.zmi import IKeyNumbersParentForm
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_content.shared.common import IWfSharedContent
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
 from pyams_i18n.interfaces import II18n
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.keynumber.zmi import IKeyNumbersParentForm
-from pyams_content.component.keynumber.paragraph import KeyNumberParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
-    BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -112,7 +108,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/__init__.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/__init__.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,27 +12,21 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
-
 from pyramid.location import lineage
-from z3c.form import field, button
+from z3c.form import button, field
 from zope.interface import Interface
 
-from pyams_content import _
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IBaseParagraph, IParagraphFactory, \
+from pyams_content.component.paragraph.interfaces import IBaseParagraph, IParagraphContainerTarget, IParagraphFactory, \
     IParagraphFactorySettings, IParagraphRenderer
-# import packages
-from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, ParagraphContainerBaseTable
+from pyams_content.component.paragraph.zmi.container import ParagraphContainerBaseTable, ParagraphContainerTable
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView
 from pyams_content.features.renderer.zmi import BaseRenderedContentRenderer
 from pyams_content.interfaces import MANAGE_TOOL_PERMISSION
 from pyams_content.shared.common.interfaces import IWfSharedContent
-from pyams_form.form import AJAXEditForm, AJAXAddForm, ajax_config
+from pyams_form.form import AJAXAddForm, AJAXEditForm, ajax_config
 from pyams_form.help import FormHelp
 from pyams_form.interfaces.form import IFormHelp, check_submit_button
-from pyams_form.schema import ActionButton, CloseButton
+from pyams_form.schema import ActionButton, CloseButton, ResetButton
 from pyams_form.security import ProtectedFormObjectMixin
 from pyams_i18n.interfaces import II18n
 from pyams_pagelet.pagelet import pagelet_config
@@ -41,7 +35,7 @@
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
 from pyams_skin.table import get_element_id
-from pyams_skin.viewlet.menu import MenuItem, MenuDivider
+from pyams_skin.viewlet.menu import MenuDivider, MenuItem
 from pyams_skin.viewlet.toolbar import ToolbarMenuItem
 from pyams_utils.adapter import adapter_config
 from pyams_utils.registry import query_utility
@@ -51,6 +45,8 @@
 from pyams_zmi.interfaces.menu import IPropertiesMenu
 from pyams_zmi.layer import IAdminLayer
 
+from pyams_content import _
+
 
 #
 # Default paragraphs settings
@@ -215,11 +211,24 @@
     submit = button.Button(name='submit', title=_("Submit"), condition=check_submit_button)
 
 
+class IParagraphInnerEditFormButtons(Interface):
+    """Paragraph inner edit form buttons"""
+
+    preview = ActionButton(name='preview', title=_("Preview"),
+                           label_css_class='fa fa-fw fa-binoculars',
+                           url='content-preview.html',
+                           modal_target=True)
+
+    cancel = ResetButton(name='cancel', title=_("Cancel"))
+
+    submit = button.Button(name='submit', title=_("Submit"), condition=check_submit_button)
+
+
 class BaseParagraphPropertiesEditForm(AdminDialogEditForm):
     """Base paragraph edit form"""
 
     prefix = 'paragraph.'
-    buttons = button.Buttons(IParagraphEditFormButtons)
+    buttons = button.Buttons(IParagraphInnerEditFormButtons)
 
     @property
     def title(self):
@@ -249,7 +258,7 @@
                     get_json_widget_refresh_event(self.context, self.request, self.__class__, 'renderer'))
                 renderer = self.context.get_renderer(self.request)
                 if (renderer is not None) and \
-                   (renderer.settings_interface is not None):
+                        (renderer.settings_interface is not None):
                     output['smallbox'] = {
                         'status': 'info',
                         'message': self.request.localizer.translate(_("You changed renderer selection. Don't omit to "
--- a/src/pyams_content/component/paragraph/zmi/audio.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/audio.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,36 +12,32 @@
 
 __docformat__ = 'restructuredtext'
 
+from transaction.interfaces import ITransactionManager
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import standard library
-
-# import interfaces
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.audio import AudioParagraph
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.interfaces.audio import IAudioParagraph, AUDIO_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.interfaces.audio import AUDIO_PARAGRAPH_TYPE, IAudioParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_refresh_event, \
+    IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_form_refresh_event, get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from transaction.interfaces import ITransactionManager
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.audio import AudioParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons, get_json_paragraph_refresh_event
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_form_refresh_event, get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 from pyams_content import _
 
@@ -108,7 +104,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/contact.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/contact.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,35 +12,30 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from transaction.interfaces import ITransactionManager
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
-    IBaseParagraph, PARAGRAPH_HIDDEN_FIELDS
+from pyams_content.component.paragraph.contact import ContactParagraph
+from pyams_content.component.paragraph.interfaces import IBaseParagraph, IParagraphContainer, IParagraphContainerTarget, \
+    PARAGRAPH_HIDDEN_FIELDS
 from pyams_content.component.paragraph.interfaces.contact import CONTACT_PARAGRAPH_TYPE, IContactParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_refresh_event
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_form_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from transaction.interfaces import ITransactionManager
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.contact import ContactParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
-    BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm, get_json_paragraph_refresh_event, \
-    IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_form_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -107,7 +102,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/frame.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/frame.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,42 +12,37 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import Interface, implementer
 
-# import interfaces
 from pyams_content.component.association.interfaces import IAssociationContainerTarget
+from pyams_content.component.association.zmi import AssociationsTable
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.frame import FrameParagraph
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.interfaces.frame import IFrameParagraph, FRAME_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.interfaces.frame import FRAME_PARAGRAPH_TYPE, IFrameParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_toolbar_refresh_event
+from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, \
+    ParagraphTitleToolbarViewletManager
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_switched_table_refresh_event, get_json_widget_refresh_event
 from pyams_skin.interfaces.tinymce import ITinyMCEConfiguration
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.association.zmi import AssociationsTable
-from pyams_content.component.paragraph.frame import FrameParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_toolbar_refresh_event, \
-    IParagraphEditFormButtons
-from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable, \
-    ParagraphTitleToolbarViewletManager
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_switched_table_refresh_event, get_json_widget_refresh_event
-from pyams_utils.adapter import adapter_config, ContextRequestAdapter
+from pyams_utils.adapter import ContextRequestAdapter, adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer, Interface
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 from pyams_content import _
 
@@ -168,7 +163,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/header.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/header.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,27 +12,22 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
 from pyams_content.component.paragraph.interfaces.header import IHeaderParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXEditForm, BaseParagraphPropertiesEditForm, \
+    IParagraphInnerEditFormButtons, get_json_paragraph_refresh_event
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
-from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXEditForm, \
-    BaseParagraphPropertiesEditForm, get_json_paragraph_refresh_event, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.event import get_json_widget_refresh_event
+from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.adapter import adapter_config
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -80,7 +75,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/html.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/html.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,42 +12,37 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
 from pyams_content.component.association.interfaces import IAssociationContainerTarget
+from pyams_content.component.association.zmi import AssociationsTable
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphFactorySettings, \
-    IParagraphContainer, PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.interfaces.html import IHTMLParagraph, IRawParagraph, RAW_PARAGRAPH_TYPE, \
-    HTML_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.html import HTMLParagraph, RawParagraph
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
+    IParagraphFactorySettings, PARAGRAPH_HIDDEN_FIELDS
+from pyams_content.component.paragraph.interfaces.html import HTML_PARAGRAPH_TYPE, IHTMLParagraph, IRawParagraph, \
+    RAW_PARAGRAPH_TYPE
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_toolbar_refresh_event
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
-from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
-from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.association.zmi import AssociationsTable
-from pyams_content.component.paragraph.html import HTMLParagraph, RawParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, get_json_paragraph_toolbar_refresh_event, \
-    IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
 from pyams_form.security import ProtectedFormObjectMixin
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.event import get_json_switched_table_refresh_event
+from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
+from pyams_skin.layer import IPyAMSLayer
 from pyams_skin.viewlet.menu import MenuDivider
 from pyams_utils.adapter import adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 from pyams_content import _
 
@@ -142,7 +137,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
@@ -238,7 +233,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/keypoint.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/keypoint.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,33 +12,28 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
 from pyams_content.component.paragraph.interfaces.keypoint import IKeypointsParagraph, KEYPOINTS_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.keypoint import KeypointsParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.keypoint import KeypointsParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -116,7 +111,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/map.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/map.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,13 +12,9 @@
 
 __docformat__ = 'restructuredtext'
 
-
 from pyams_content.component.paragraph.interfaces.map import have_gis
 if have_gis:
 
-    # import standard library
-
-    # import interfaces
     from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
         IBaseParagraph, PARAGRAPH_HIDDEN_FIELDS
     from pyams_content.component.paragraph.interfaces.map import MAP_PARAGRAPH_TYPE, IMapParagraph
@@ -29,11 +25,10 @@
     from pyams_skin.layer import IPyAMSLayer
     from z3c.form.interfaces import INPUT_MODE
 
-    # import packages
     from pyams_content.component.paragraph.map import MapParagraph
     from pyams_content.component.paragraph.zmi import IParagraphContainerView, BaseParagraphAddMenu, \
         BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, BaseParagraphPropertiesEditForm, \
-        IParagraphEditFormButtons, get_json_paragraph_refresh_event
+        get_json_paragraph_refresh_event, IParagraphInnerEditFormButtons
     from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
     from pyams_form.form import ajax_config
     from pyams_pagelet.pagelet import pagelet_config
@@ -109,7 +104,7 @@
         @property
         def buttons(self):
             if self.mode == INPUT_MODE:
-                return button.Buttons(IParagraphEditFormButtons)
+                return button.Buttons(IParagraphInnerEditFormButtons)
             else:
                 return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,30 +12,25 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
 import json
 
 from pyramid.decorator import reify
 from pyramid.view import view_config
-from z3c.form import field, button
+from z3c.form import button, field
 from z3c.form.interfaces import INPUT_MODE
 from z3c.table.column import GetAttrColumn
-from z3c.table.interfaces import IValues, IColumn
-from zope.interface import implementer, Interface
+from z3c.table.interfaces import IColumn, IValues
+from zope.interface import Interface, implementer
 from zope.schema.vocabulary import getVocabularyRegistry
 
-from pyams_content import _
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.interfaces.milestone import MILESTONE_PARAGRAPH_TYPE, IMilestoneParagraph, \
-    IMilestoneContainer, IMilestoneContainerTarget, IMilestone
-# import packages
-from pyams_content.component.paragraph.milestone import MilestoneParagraph, Milestone
-from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
-    BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
-from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
+from pyams_content.component.paragraph.interfaces.milestone import IMilestone, IMilestoneContainer, \
+    IMilestoneContainerTarget, IMilestoneParagraph, MILESTONE_PARAGRAPH_TYPE
+from pyams_content.component.paragraph.milestone import Milestone, MilestoneParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi import IParagraphContainerView
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
@@ -51,15 +46,17 @@
     get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
 from pyams_skin.layer import IPyAMSLayer
-from pyams_skin.table import BaseTable, SorterColumn, I18nColumn, TrashColumn, VisibilitySwitcherColumn
+from pyams_skin.table import BaseTable, I18nColumn, SorterColumn, TrashColumn, VisibilitySwitcherColumn
 from pyams_skin.viewlet.toolbar import ToolbarAction
-from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
+from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_utils.url import absolute_url
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
 from pyams_zmi.zmi.table import InnerTableView
 
+from pyams_content import _
+
 
 class IMilestonesView(Interface):
     """Milestones view marker interface"""
@@ -135,7 +132,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
@@ -146,8 +143,8 @@
             form = MilestoneParagraphInnerEditForm(self.context, self.request)
             form.update()
             output.setdefault('events', []) \
-                  .append(get_json_widget_refresh_event(self.context, self.request,
-                                                        MilestoneParagraphInnerEditForm, 'renderer'))
+                .append(get_json_widget_refresh_event(self.context, self.request,
+                                                      MilestoneParagraphInnerEditForm, 'renderer'))
         return output
 
 
--- a/src/pyams_content/component/paragraph/zmi/pictogram.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/pictogram.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,31 +12,26 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
 import json
 
 from pyramid.decorator import reify
 from pyramid.events import subscriber
 from pyramid.view import view_config
-from z3c.form import field, button
-from z3c.form.interfaces import INPUT_MODE, IDataExtractedEvent
+from z3c.form import button, field
+from z3c.form.interfaces import IDataExtractedEvent, INPUT_MODE
 from z3c.table.column import GetAttrColumn
-from z3c.table.interfaces import IValues, IColumn
-from zope.interface import implementer, Interface, Invalid
+from z3c.table.interfaces import IColumn, IValues
+from zope.interface import Interface, Invalid, implementer
 
-from pyams_content import _
-# import packages
 from pyams_content.component.paragraph import BaseParagraph
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.interfaces.pictogram import PICTOGRAM_PARAGRAPH_TYPE, IPictogramParagraph, \
-    IPictogramContainer, IPictogramContainerTarget, IPictogramItem
-from pyams_content.component.paragraph.pictogram import PictogramParagraph, PictogramItem
-from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
-    BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm
-from pyams_content.component.paragraph.zmi import IParagraphContainerView, IParagraphEditFormButtons
+from pyams_content.component.paragraph.interfaces.pictogram import IPictogramContainer, IPictogramContainerTarget, \
+    IPictogramItem, IPictogramParagraph, PICTOGRAM_PARAGRAPH_TYPE
+from pyams_content.component.paragraph.pictogram import PictogramItem, PictogramParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi import IParagraphContainerView
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
@@ -50,13 +45,13 @@
 from pyams_i18n.interfaces import II18n
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.container import switch_element_visibility
-from pyams_skin.event import get_json_widget_refresh_event, get_json_switched_table_refresh_event, \
-    get_json_table_row_refresh_event
+from pyams_skin.event import get_json_switched_table_refresh_event, get_json_table_row_refresh_event, \
+    get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu, IWidgetTitleViewletManager
 from pyams_skin.layer import IPyAMSLayer
-from pyams_skin.table import BaseTable, SorterColumn, I18nColumn, TrashColumn, VisibilitySwitcherColumn
+from pyams_skin.table import BaseTable, I18nColumn, SorterColumn, TrashColumn, VisibilitySwitcherColumn
 from pyams_skin.viewlet.toolbar import ToolbarAction
-from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
+from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
 from pyams_utils.text import get_text_start
 from pyams_utils.traversing import get_parent
 from pyams_utils.url import absolute_url
@@ -65,6 +60,8 @@
 from pyams_zmi.interfaces import IPropertiesEditForm
 from pyams_zmi.zmi.table import InnerTableView
 
+from pyams_content import _
+
 
 class IPictogramsView(Interface):
     """Pictograms view marker interface"""
@@ -140,7 +137,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/verbatim.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/verbatim.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,35 +12,30 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
 from pyams_content.component.paragraph.interfaces.verbatim import IVerbatimParagraph, VERBATIM_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.verbatim import VerbatimParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.verbatim import VerbatimParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 from pyams_content import _
 
@@ -110,7 +105,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/paragraph/zmi/video.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/video.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,36 +12,32 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from transaction.interfaces import ITransactionManager
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
 from pyams_content.component.paragraph.interfaces.video import IVideoParagraph, VIDEO_PARAGRAPH_TYPE
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.video import VideoParagraph
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_refresh_event
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_form_refresh_event, get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from pyams_zmi.interfaces import IPropertiesEditForm
-from transaction.interfaces import ITransactionManager
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.video import VideoParagraph
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons, get_json_paragraph_refresh_event
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_form_refresh_event, get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
+from pyams_zmi.interfaces import IPropertiesEditForm
 
 from pyams_content import _
 
@@ -109,7 +105,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/component/video/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/component/video/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -16,25 +16,24 @@
 from pyramid.exceptions import NotFound
 from pyramid.response import Response
 from pyramid.view import view_config
-from z3c.form import field, button
-from z3c.form.interfaces import DISPLAY_MODE, INPUT_MODE, IDataExtractedEvent
-from zope.interface import implementer, alsoProvides, Interface, Invalid
+from z3c.form import button, field
+from z3c.form.interfaces import DISPLAY_MODE, IDataExtractedEvent, INPUT_MODE
+from zope.interface import Interface, Invalid, alsoProvides, implementer
 from zope.schema import getFieldNamesInOrder
 
-from pyams_content import _
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer
-from pyams_content.component.paragraph.zmi import BaseParagraphAddMenu, BaseParagraphAJAXAddForm, \
-    BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm, get_json_paragraph_refresh_event, \
-    IParagraphEditFormButtons
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons, \
+    get_json_paragraph_refresh_event
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
-from pyams_content.component.video.interfaces import IExternalVideoProvider, IExternalVideoSettings, \
-    IExternalVideoParagraph, EXTERNAL_VIDEO_PARAGRAPH_TYPE
+from pyams_content.component.video.interfaces import EXTERNAL_VIDEO_PARAGRAPH_TYPE, IExternalVideoParagraph, \
+    IExternalVideoProvider, IExternalVideoSettings
 from pyams_content.component.video.paragraph import ExternalVideoParagraph
 from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_form.form import ajax_config
 from pyams_form.group import NamedWidgetsGroup
-from pyams_form.interfaces.form import IWidgetsSuffixViewletsManager, IInnerForm
+from pyams_form.interfaces.form import IInnerForm, IWidgetsSuffixViewletsManager
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
@@ -43,9 +42,11 @@
 from pyams_utils.interfaces.data import IObjectData
 from pyams_utils.registry import get_utility
 from pyams_utils.url import absolute_url
-from pyams_viewlet.viewlet import viewlet_config, Viewlet
+from pyams_viewlet.viewlet import Viewlet, viewlet_config
 from pyams_zmi.form import AdminDialogAddForm, InnerAdminAddForm, InnerAdminEditForm
 
+from pyams_content import _
+
 
 @viewlet_config(name='add-external-video.menu', context=IParagraphContainerTarget, view=IParagraphContainerView,
                 layer=IPyAMSLayer, manager=IToolbarAddingMenu, weight=75)
@@ -114,7 +115,7 @@
     """Handle provider name data extraction"""
     data = event.data
     if not data.get('provider_name'):
-        event.form.widgets.errors += (Invalid(_("Video provider is required")), )
+        event.form.widgets.errors += (Invalid(_("Video provider is required")),)
 
 
 @viewlet_config(name='external-video-settings', context=Interface, layer=IPyAMSLayer,
@@ -133,10 +134,10 @@
 
     def updateGroups(self):
         if 'integration_code' in self.widgets:  # custom video provider
-            self.add_group(NamedWidgetsGroup(self, 'integration_code', self.widgets, ('integration_code', ),
+            self.add_group(NamedWidgetsGroup(self, 'integration_code', self.widgets, ('integration_code',),
                                              bordered=False))
         elif 'video_id' in self.widgets:
-            self.add_group(NamedWidgetsGroup(self, 'video_id', self.widgets, ('video_id', ), bordered=False))
+            self.add_group(NamedWidgetsGroup(self, 'video_id', self.widgets, ('video_id',), bordered=False))
         field_names = getFieldNamesInOrder(self.provider.settings_interface)
         if len(field_names) > 1:
             self.add_group(NamedWidgetsGroup(self, 'provider_group', self.widgets,
@@ -239,6 +240,6 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
--- a/src/pyams_content/shared/imagemap/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/shared/imagemap/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,37 +12,32 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
-from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphInnerEditFormButtons
+from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_content.shared.common.interfaces import IWfSharedContent
 from pyams_content.shared.imagemap.interfaces import IImageMapParagraph, IMAGEMAP_PARAGRAPH_TYPE
+from pyams_content.shared.imagemap.paragraph import ImageMapParagraph
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm, IWidgetsSuffixViewletsManager
 from pyams_i18n.interfaces import II18n
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_form_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
-    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_content.shared.imagemap.paragraph import ImageMapParagraph
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_form_refresh_event
 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, Viewlet
+from pyams_viewlet.viewlet import Viewlet, viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -113,7 +108,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()
 
--- a/src/pyams_content/shared/logo/zmi/paragraph.py	Mon Oct 08 11:53:54 2018 +0200
+++ b/src/pyams_content/shared/logo/zmi/paragraph.py	Mon Oct 08 13:47:23 2018 +0200
@@ -12,37 +12,32 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from pyramid.view import view_config
+from z3c.form import button, field
+from z3c.form.interfaces import INPUT_MODE
+from zope.interface import implementer
 
-# import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+from pyams_content.component.paragraph.interfaces import IParagraphContainer, IParagraphContainerTarget, \
     PARAGRAPH_HIDDEN_FIELDS
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, \
+    BaseParagraphAddMenu, BaseParagraphPropertiesEditForm, IParagraphContainerView, IParagraphInnerEditFormButtons
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor
+from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_content.shared.common import IWfSharedContent
 from pyams_content.shared.logo.interfaces import ILogosParagraph, LOGOS_PARAGRAPH_TYPE
+from pyams_content.shared.logo.paragraph import LogosParagraph
+from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IInnerForm
 from pyams_i18n.interfaces import II18n
+from pyams_pagelet.pagelet import pagelet_config
+from pyams_skin.event import get_json_widget_refresh_event
 from pyams_skin.interfaces.viewlet import IToolbarAddingMenu
 from pyams_skin.layer import IPyAMSLayer
-from z3c.form.interfaces import INPUT_MODE
-
-# import packages
-from pyams_content.component.paragraph.zmi import IParagraphContainerView, BaseParagraphAddMenu, \
-    BaseParagraphAJAXAddForm, BaseParagraphPropertiesEditForm, BaseParagraphAJAXEditForm, IParagraphEditFormButtons
-from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
-from pyams_content.shared.logo.paragraph import LogosParagraph
-from pyams_form.form import ajax_config
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.event import get_json_widget_refresh_event
 from pyams_utils.adapter import adapter_config
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from pyramid.view import view_config
-from z3c.form import field, button
-from zope.interface import implementer
 
 from pyams_content import _
 
@@ -112,7 +107,7 @@
     @property
     def buttons(self):
         if self.mode == INPUT_MODE:
-            return button.Buttons(IParagraphEditFormButtons)
+            return button.Buttons(IParagraphInnerEditFormButtons)
         else:
             return button.Buttons()