web/views/forms.py
changeset 4248 d375643eea43
parent 4236 9260403bfe0b
child 4252 6c4f109c2b03
equal deleted inserted replaced
4241:da919ea92880 4248:d375643eea43
   248         if self._cw.json_request and self.edited_entity.has_eid():
   248         if self._cw.json_request and self.edited_entity.has_eid():
   249             return '%s#%s' % (self.edited_entity.absolute_url(), self.domid)
   249             return '%s#%s' % (self.edited_entity.absolute_url(), self.domid)
   250         return '%s#%s' % (self._cw.url(), self.domid)
   250         return '%s#%s' % (self._cw.url(), self.domid)
   251 
   251 
   252     def build_context(self, formvalues=None):
   252     def build_context(self, formvalues=None):
       
   253         if self.formvalues is not None:
       
   254             return # already built
   253         super(EntityFieldsForm, self).build_context(formvalues)
   255         super(EntityFieldsForm, self).build_context(formvalues)
   254         edited = set()
   256         edited = set()
   255         for field in self.fields:
   257         for field in self.fields:
   256             if field.eidparam:
   258             if field.eidparam:
   257                 edited.add(field.role_name())
   259                 edited.add(field.role_name())