--- 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)