366 copy_nav_params=False) |
366 copy_nav_params=False) |
367 self.add_hiddens(form, entity, peid, rtype, role) |
367 self.add_hiddens(form, entity, peid, rtype, role) |
368 divid = '%s-%s-%s' % (peid, rtype, entity.eid) |
368 divid = '%s-%s-%s' % (peid, rtype, entity.eid) |
369 title = self.schema.rschema(rtype).display_name(self.req, role) |
369 title = self.schema.rschema(rtype).display_name(self.req, role) |
370 removejs = self.removejs % (peid, rtype,entity.eid) |
370 removejs = self.removejs % (peid, rtype,entity.eid) |
|
371 countkey = '%s_count' % rtype |
|
372 try: |
|
373 self.req.data[countkey] += 1 |
|
374 except: |
|
375 self.req.data[countkey] = 1 |
371 self.w(form.form_render(divid=divid, title=title, removejs=removejs, |
376 self.w(form.form_render(divid=divid, title=title, removejs=removejs, |
372 **kwargs)) |
377 counter=self.req.data[countkey], **kwargs)) |
373 |
378 |
374 def add_hiddens(self, form, entity, peid, rtype, role): |
379 def add_hiddens(self, form, entity, peid, rtype, role): |
375 # to ease overriding (see cubes.vcsfile.views.forms for instance) |
380 # to ease overriding (see cubes.vcsfile.views.forms for instance) |
376 if self.keep_entity(form, entity, peid, rtype): |
381 if self.keep_entity(form, entity, peid, rtype): |
377 if entity.has_eid(): |
382 if entity.has_eid(): |