web/views/cwproperties.py
changeset 4252 6c4f109c2b03
parent 4224 5998df006968
parent 4216 6c9e67a89b3a
child 4258 16804a4f555d
--- a/web/views/cwproperties.py	Mon Jan 18 19:05:08 2010 +0100
+++ b/web/views/cwproperties.py	Mon Jan 18 19:21:30 2010 +0100
@@ -1,7 +1,7 @@
 """Specific views for CWProperty
 
 :organization: Logilab
-:copyright: 2007-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
+:copyright: 2007-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
@@ -67,6 +67,7 @@
     """site-wide properties edition form"""
     __regid__ = 'systempropertiesform'
     __select__ = none_rset() & match_user_groups('managers')
+    form_buttons = [SubmitButton()]
 
     title = _('site configuration')
     category = 'startupview'
@@ -187,10 +188,9 @@
         return entity
 
     def form(self, formid, keys, splitlabel=False):
-        buttons = [SubmitButton()]
-        form = self._cw.vreg['forms'].select(
-            'composite', self._cw, domid=formid, action=self._cw.build_url(),
-            form_buttons=buttons,
+        form = self.vreg['forms'].select(
+            'composite', self.req, domid=formid, action=self.build_url(),
+            form_buttons=self.form_buttons,
             onsubmit="return validatePrefsForm('%s')" % formid,
             submitmsg=self._cw._('changes applied'))
         path = self._cw.relative_path()