web/views/editforms.py
changeset 2293 7ded2a1416e4
parent 2234 1fbcf202882d
parent 2247 9dbbe6a4c9b0
child 2381 caad2367d940
--- a/web/views/editforms.py	Thu Jul 02 10:36:25 2009 +0200
+++ b/web/views/editforms.py	Mon Jul 06 19:55:18 2009 +0200
@@ -368,8 +368,13 @@
         divid = '%s-%s-%s' % (peid, rtype, entity.eid)
         title = self.schema.rschema(rtype).display_name(self.req, role)
         removejs = self.removejs % (peid, rtype,entity.eid)
+        countkey = '%s_count' % rtype
+        try:
+            self.req.data[countkey] += 1
+        except:
+            self.req.data[countkey] = 1
         self.w(form.form_render(divid=divid, title=title, removejs=removejs,
-                                **kwargs))
+                                counter=self.req.data[countkey], **kwargs))
 
     def add_hiddens(self, form, entity, peid, rtype, role):
         # to ease overriding (see cubes.vcsfile.views.forms for instance)