web/views/editforms.py
branchstable
changeset 3689 deb13e88e037
parent 3643 8513fd032d1f
child 3720 5376aaadd16b
child 3742 20f429eb5f46
equal deleted inserted replaced
3688:421fb447ecb2 3689:deb13e88e037
   167             default = xml_escape(self.req._('<no value>'))
   167             default = xml_escape(self.req._('<no value>'))
   168         entity = self.entity(row, col)
   168         entity = self.entity(row, col)
   169         rschema = entity.schema.rschema(rtype)
   169         rschema = entity.schema.rschema(rtype)
   170         lzone = self._build_landing_zone(landing_zone)
   170         lzone = self._build_landing_zone(landing_zone)
   171         # compute value, checking perms, build form
   171         # compute value, checking perms, build form
   172         if rschema.is_final():
   172         if rschema.final:
   173             onsubmit = ("return inlineValidateAttributeForm('%(rtype)s', '%(eid)s', '%(divid)s', "
   173             onsubmit = ("return inlineValidateAttributeForm('%(rtype)s', '%(eid)s', '%(divid)s', "
   174                         "%(reload)s, '%(default)s');")
   174                         "%(reload)s, '%(default)s');")
   175             form = self._build_form(
   175             form = self._build_form(
   176                 entity, rtype, role, 'edition', default, onsubmit, reload,
   176                 entity, rtype, role, 'edition', default, onsubmit, reload,
   177                 attrcategories=self.attrcategories)
   177                 attrcategories=self.attrcategories)
   398         if entity.eid == self.newentity.eid:
   398         if entity.eid == self.newentity.eid:
   399             form.form_add_hidden(eid_param('__cloned_eid', entity.eid),
   399             form.form_add_hidden(eid_param('__cloned_eid', entity.eid),
   400                                  self.copying.eid)
   400                                  self.copying.eid)
   401         for rschema, _, role in form.relations_by_category(form.attrcategories,
   401         for rschema, _, role in form.relations_by_category(form.attrcategories,
   402                                                            'add'):
   402                                                            'add'):
   403             if not rschema.is_final():
   403             if not rschema.final:
   404                 # ensure relation cache is filed
   404                 # ensure relation cache is filed
   405                 rset = self.copying.related(rschema, role)
   405                 rset = self.copying.related(rschema, role)
   406                 self.newentity.set_related_cache(rschema, role, rset)
   406                 self.newentity.set_related_cache(rschema, role, rset)
   407 
   407 
   408     def submited_message(self):
   408     def submited_message(self):