src/pyams_content/component/illustration/zmi/paragraph.py
changeset 150 90a1cb45caf8
parent 140 67bad9f880ee
child 160 ff4fc5786058
--- a/src/pyams_content/component/illustration/zmi/paragraph.py	Tue Sep 12 16:42:12 2017 +0200
+++ b/src/pyams_content/component/illustration/zmi/paragraph.py	Tue Sep 12 16:42:36 2017 +0200
@@ -31,9 +31,8 @@
 
 # import packages
 from pyams_content.component.illustration.paragraph import Illustration
-from pyams_content.component.paragraph.zmi import BaseParagraphAJAXEditForm
+from pyams_content.component.paragraph.zmi import BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm
 from pyams_content.component.paragraph.zmi.container import ParagraphContainerView
-from pyams_form.form import AJAXAddForm
 from pyams_form.security import ProtectedFormObjectMixin
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.viewlet.toolbar import ToolbarMenuItem
@@ -90,13 +89,9 @@
 
 @view_config(name='add-illustration.json', context=IParagraphContainerTarget, request_type=IPyAMSLayer,
              permission=MANAGE_CONTENT_PERMISSION, renderer='json', xhr=True)
-class IllustrationAJAXAddForm(AJAXAddForm, IllustrationAddForm):
+class IllustrationAJAXAddForm(BaseParagraphAJAXAddForm, IllustrationAddForm):
     """HTML paragraph add form, JSON renderer"""
 
-    def get_ajax_output(self, changes):
-        return {'status': 'reload',
-                'location': '#paragraphs.html'}
-
 
 @pagelet_config(name='properties.html', context=IIllustrationParagraph, layer=IPyAMSLayer,
                 permission=MANAGE_CONTENT_PERMISSION)