--- a/src/pyams_content/component/paragraph/zmi/header.py Tue Sep 12 16:42:36 2017 +0200
+++ b/src/pyams_content/component/paragraph/zmi/header.py Tue Sep 12 16:45:45 2017 +0200
@@ -30,9 +30,8 @@
# import packages
from pyams_content.component.paragraph.header import HeaderParagraph
-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
@@ -85,13 +84,9 @@
@view_config(name='add-header-paragraph.json', context=IParagraphContainerTarget, request_type=IPyAMSLayer,
permission=MANAGE_CONTENT_PERMISSION, renderer='json', xhr=True)
-class HeaderParagraphAJAXAddForm(AJAXAddForm, HeaderParagraphAddForm):
+class HeaderParagraphAJAXAddForm(BaseParagraphAJAXAddForm, HeaderParagraphAddForm):
"""Header paragraph add form, JSON renderer"""
- def get_ajax_output(self, changes):
- return {'status': 'reload',
- 'location': '#paragraphs.html'}
-
@pagelet_config(name='properties.html', context=IHeaderParagraph, layer=IPyAMSLayer,
permission=MANAGE_CONTENT_PERMISSION)