Added base FormManager clsas
authorThierry Florac <tflorac@ulthar.net>
Wed, 27 Jan 2021 15:31:02 +0100
changeset 221 21453aabc61f
parent 220 08755669300a
child 222 ab62ab8fbcd3
Added base FormManager clsas
src/pyams_form/manager.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_form/manager.py	Wed Jan 27 15:31:02 2021 +0100
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net>
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+"""PyAMS_*** module
+
+"""
+
+__docformat__ = 'restructuredtext'
+
+from pyams_utils.adapter import ContextRequestViewAdapter
+from pyams_zmi.form import AdminDialogEditForm
+
+
+class DialogEditFormFormManager(ContextRequestViewAdapter):
+    """Form manager base class"""
+
+    def getFields(self):
+        raise NotImplementedError
+
+    def update(self):
+        AdminDialogEditForm.update(self.view)
+
+    def updateWidgets(self, prefix=None):
+        AdminDialogEditForm.updateWidgets(self.view, prefix)
+
+    def updateActions(self):
+        AdminDialogEditForm.updateActions(self.view)
+
+    def updateGroups(self):
+        AdminDialogEditForm.updateGroups(self.view)