Updated FormObject events interfaces
authorThierry Florac <thierry.florac@onf.fr>
Tue, 26 Jun 2018 12:55:37 +0200
changeset 121 cd6dec930b3e
parent 120 0b22b765cdb0
child 122 e8d0176a4f42
Updated FormObject events interfaces
src/pyams_form/interfaces/form.py
--- a/src/pyams_form/interfaces/form.py	Thu Jun 21 10:37:49 2018 +0200
+++ b/src/pyams_form/interfaces/form.py	Tue Jun 26 12:55:37 2018 +0200
@@ -568,13 +568,13 @@
     """Form created event"""
 
 
-class IViewObjectEvent(IObjectEvent):
+class IFormObjectEvent(IObjectEvent):
     """View object event interface"""
 
-    view = Attribute("View in which event was fired")
+    form = Attribute("Form in which event was fired")
 
 
-class IFormObjectCreatedEvent(IObjectCreatedEvent, IViewObjectEvent):
+class IFormObjectCreatedEvent(IObjectCreatedEvent, IFormObjectEvent):
     """Event fired after final object creation"""
 
 
@@ -582,12 +582,12 @@
 class FormObjectCreatedEvent(ObjectCreatedEvent):
     """Form object created event"""
 
-    def __init__(self, object, view):
+    def __init__(self, object, form):
         self.object = object
-        self.view = view
+        self.form = form
 
 
-class IFormObjectModifiedEvent(IObjectModifiedEvent, IViewObjectEvent):
+class IFormObjectModifiedEvent(IObjectModifiedEvent, IFormObjectEvent):
     """Event fired after object modification"""
 
 
@@ -595,6 +595,6 @@
 class FormObjectModifiedEvent(ObjectModifiedEvent):
     """Form object modified event"""
 
-    def __init__(self, object, view, *descriptions):
+    def __init__(self, object, form, *descriptions):
         ObjectModifiedEvent.__init__(self, object, *descriptions)
-        self.view = view
+        self.form = form