169 schema = self._cw.vreg.schema |
169 schema = self._cw.vreg.schema |
170 entity = self.cw_rset.get_entity(row, col) |
170 entity = self.cw_rset.get_entity(row, col) |
171 rschema = schema.rschema(rtype) |
171 rschema = schema.rschema(rtype) |
172 lzone = self._build_landing_zone(landing_zone) |
172 lzone = self._build_landing_zone(landing_zone) |
173 # compute value, checking perms, build form |
173 # compute value, checking perms, build form |
174 if rschema.is_final(): |
174 if rschema.final: |
175 onsubmit = ("return inlineValidateAttributeForm('%(rtype)s', '%(eid)s', '%(divid)s', " |
175 onsubmit = ("return inlineValidateAttributeForm('%(rtype)s', '%(eid)s', '%(divid)s', " |
176 "%(reload)s, '%(default)s');") |
176 "%(reload)s, '%(default)s');") |
177 form = self._build_form( |
177 form = self._build_form( |
178 entity, rtype, role, default, onsubmit, reload) |
178 entity, rtype, role, default, onsubmit, reload) |
179 if not self.should_edit_attribute(entity, rschema, role, form): |
179 if not self.should_edit_attribute(entity, rschema, role, form): |
396 super(CopyFormView, self).init_form(form, entity) |
396 super(CopyFormView, self).init_form(form, entity) |
397 if entity.eid == self.newentity.eid: |
397 if entity.eid == self.newentity.eid: |
398 form.form_add_hidden(eid_param('__cloned_eid', entity.eid), |
398 form.form_add_hidden(eid_param('__cloned_eid', entity.eid), |
399 self.copying.eid) |
399 self.copying.eid) |
400 for rschema, role in form.editable_attributes(): |
400 for rschema, role in form.editable_attributes(): |
401 if not rschema.is_final(): |
401 if not rschema.final: |
402 # ensure relation cache is filed |
402 # ensure relation cache is filed |
403 rset = self.copying.related(rschema, role) |
403 rset = self.copying.related(rschema, role) |
404 self.newentity.set_related_cache(rschema, role, rset) |
404 self.newentity.set_related_cache(rschema, role, rset) |
405 |
405 |
406 def submited_message(self): |
406 def submited_message(self): |