ease customization of title stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 27 Nov 2009 23:47:28 +0100
branchstable
changeset 3933 865b6be915ec
parent 3932 8c883f1f108e
child 3934 d9a29a1fbe43
ease customization of title
web/views/editforms.py
--- a/web/views/editforms.py	Fri Nov 27 23:45:18 2009 +0100
+++ b/web/views/editforms.py	Fri Nov 27 23:47:28 2009 +0100
@@ -512,8 +512,9 @@
         """fetch and render the form"""
         entity = self._entity()
         divid = '%s-%s-%s' % (self.peid, self.rtype, entity.eid)
-        title = self.form_title(entity, i18nctx=i18nctx, **kwargs)
-        removejs = self.removejs % (self.peid, self.rtype, entity.eid)
+        title = self.form_title(entity, i18nctx)
+        removejs = self.removejs and self.removejs % (
+            self.peid, self.rtype, entity.eid)
         countkey = '%s_count' % self.rtype
         try:
             self.req.data[countkey] += 1
@@ -523,7 +524,7 @@
             divid=divid, title=title, removejs=removejs, i18nctx=i18nctx,
             counter=self.req.data[countkey], **kwargs))
 
-    def form_title(self, entity, i18nctx, **kwargs):
+    def form_title(self, entity, i18nctx):
         return self.req.pgettext(i18nctx, 'This %s' % entity.e_schema)
 
     def add_hiddens(self, form, entity):