Added missing implemented interface
authorThierry Florac <tflorac@ulthar.net>
Sat, 28 Feb 2015 16:20:01 +0100
changeset 2 bc1d70f9a9e2
parent 1 3e9b0f7d068b
child 3 b284b151f292
Added missing implemented interface
src/pyams_zmi/site.py
--- a/src/pyams_zmi/site.py	Sat Feb 28 16:19:28 2015 +0100
+++ b/src/pyams_zmi/site.py	Sat Feb 28 16:20:01 2015 +0100
@@ -17,7 +17,6 @@
 
 # import interfaces
 from pyams_form.interfaces.form import IWidgetForm
-from pyams_pagelet.interfaces import PageletCreatedEvent
 from pyams_skin.interfaces import IInnerPage, IPageHeader
 from pyams_skin.interfaces.configuration import IConfiguration
 from pyams_skin.layer import IPyAMSLayer
@@ -26,13 +25,13 @@
 from pyams_zmi.layer import IAdminLayer
 
 # import packages
-from pyams_form.form import EditForm, AJAXEditForm
+from pyams_form.form import AJAXEditForm
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.viewlet.menu import MenuItem
 from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config
 from pyams_viewlet.manager import viewletmanager_config
 from pyams_viewlet.viewlet import viewlet_config
-from pyams_zmi.view import AdminView
+from pyams_zmi.form import AdminEditForm
 from pyramid.decorator import reify
 from pyramid.view import view_config
 from z3c.form import field
@@ -44,6 +43,7 @@
 @viewlet_config(name='properties.menu', layer=IAdminLayer, context=ISiteRoot, manager=ISiteManagementMenu,
                 permission='system.view', weight=1)
 @viewletmanager_config(name='properties.menu', layer=IAdminLayer, context=ISiteRoot, provides=IPropertiesMenu)
+@implementer(IPropertiesMenu)
 class PropertiesMenuItem(MenuItem):
     """Properties menu"""
 
@@ -54,7 +54,7 @@
 
 @pagelet_config(name='properties.html', context=ISiteRoot, layer=IPyAMSLayer, permission='system.view')
 @implementer(IWidgetForm, IInnerPage)
-class PropertiesEditForm(AdminView, EditForm):
+class PropertiesEditForm(AdminEditForm):
     """Properties edit form"""
 
     legend = _("Update main site properties")
@@ -72,10 +72,6 @@
         content = self.getContent()
         return field.Fields(get_configuration_interface(content)).omit('__name__')
 
-    def update(self):
-        self.request.registry.notify(PageletCreatedEvent(self))
-        super(PropertiesEditForm, self).update()
-
     def getContent(self):
         return IConfiguration(self.context)