--- a/src/pyams_content/component/paragraph/zmi/__init__.py Tue Sep 12 16:40:44 2017 +0200
+++ b/src/pyams_content/component/paragraph/zmi/__init__.py Tue Sep 12 16:41:24 2017 +0200
@@ -25,7 +25,7 @@
from pyams_zmi.layer import IAdminLayer
# import packages
-from pyams_form.form import AJAXEditForm
+from pyams_form.form import AJAXEditForm, AJAXAddForm
from pyams_form.help import FormHelp
from pyams_pagelet.pagelet import pagelet_config
from pyams_skin.viewlet.menu import MenuItem
@@ -80,9 +80,17 @@
#
-# Base paragraph add form
+# Base paragraph forms
#
+class BaseParagraphAJAXAddForm(AJAXAddForm):
+ """Base paragraph AJAX add form"""
+
+ def get_ajax_output(self, changes):
+ return {'status': 'reload',
+ 'location': '#paragraphs.html'}
+
+
class BaseParagraphAJAXEditForm(AJAXEditForm):
"""Base paragraph AJAX edit form"""