Added inner admin forms
authorThierry Florac <thierry.florac@onf.fr>
Tue, 19 Jan 2016 10:32:02 +0100
changeset 13 1b81f4f5f1f1
parent 12 d0a8ba580d29
child 14 0acae95be0bd
Added inner admin forms
src/pyams_zmi/form.py
--- a/src/pyams_zmi/form.py	Thu Oct 08 09:43:20 2015 +0200
+++ b/src/pyams_zmi/form.py	Tue Jan 19 10:32:02 2016 +0100
@@ -16,56 +16,44 @@
 # import standard library
 
 # import interfaces
-from pyams_pagelet.interfaces import PageletCreatedEvent
 
 # import packages
-from pyams_form.form import AddForm, DialogAddForm, EditForm, DialogEditForm, DisplayForm, DialogDisplayForm
+from pyams_form.form import AddForm, DialogAddForm, EditForm, DialogEditForm, DisplayForm, DialogDisplayForm, \
+    InnerEditForm, InnerAddForm, InnerDisplayForm
 from pyams_zmi.view import AdminView
 
 
 class AdminAddForm(AdminView, AddForm):
     """Admin add form"""
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminAddForm, self).update()
+
+class InnerAdminAddForm(AdminView, InnerAddForm):
+    """Inner admin add form"""
 
 
 class AdminDialogAddForm(AdminView, DialogAddForm):
     """Admin dialog add form"""
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminDialogAddForm, self).update()
-
 
 class AdminEditForm(AdminView, EditForm):
     """Admin edit form"""
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminEditForm, self).update()
+
+class InnerAdminEditForm(AdminView, InnerEditForm):
+    """Inner admin edit form"""
 
 
 class AdminDialogEditForm(AdminView, DialogEditForm):
     """Admin dialog edit form"""
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminDialogEditForm, self).update()
-
 
 class AdminDisplayForm(AdminView, DisplayForm):
-    """Admin dialog display form"""
+    """Admin display form"""
+
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminDisplayForm, self).update()
+class InnerAdminDisplayForm(AdminView, InnerDisplayForm):
+    """Inner admin display form"""
 
 
 class AdminDialogDisplayForm(AdminView, DialogDisplayForm):
     """Admin dialog display form"""
-
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(AdminDialogDisplayForm, self).update()