--- a/src/pyams_zmi/view.py Tue Jan 19 10:32:02 2016 +0100
+++ b/src/pyams_zmi/view.py Tue Jan 19 10:33:11 2016 +0100
@@ -15,8 +15,10 @@
# import standard library
# import interfaces
+from pyams_form.interfaces.form import IFormCreatedEvent
from pyams_pagelet.interfaces import IPageletCreatedEvent
from pyams_zmi.interfaces import IAdminView
+from pyams_zmi.layer import IAdminLayer
# import packages
from pyams_skin.skin import apply_skin
@@ -28,8 +30,16 @@
class AdminView(object):
"""Base admin view"""
+ layer = IAdminLayer
+
@subscriber(IPageletCreatedEvent, context_selector=IAdminView)
def handle_admin_view(event):
- """Set admin skin for admin pages"""
+ """Set skin for admin views"""
apply_skin(event.object.request, 'PyAMS admin skin')
+
+
+@subscriber(IFormCreatedEvent, context_selector=IAdminView)
+def handle_admin_form(event):
+ """Set skin for admin forms"""
+ apply_skin(event.object.request, 'PyAMS admin skin')