web/views/forms.py
changeset 2650 18aec79ec3a3
parent 2573 9c414dbc76da
child 2657 de974465d381
equal deleted inserted replaced
2649:5d4a943695d1 2650:18aec79ec3a3
   177         if renderer is None:
   177         if renderer is None:
   178             renderer = self.form_default_renderer()
   178             renderer = self.form_default_renderer()
   179         return renderer.render(self, values)
   179         return renderer.render(self, values)
   180 
   180 
   181     def form_default_renderer(self):
   181     def form_default_renderer(self):
   182         return self.vreg.select('formrenderers', self.form_renderer_id,
   182         return self.vreg['formrenderers'].select(self.form_renderer_id,
   183                                 self.req, rset=self.rset,
   183                                                 self.req, rset=self.rset,
   184                                 row=self.row, col=self.col)
   184                                                 row=self.row, col=self.col)
   185 
   185 
   186     def form_build_context(self, rendervalues=None):
   186     def form_build_context(self, rendervalues=None):
   187         """build form context values (the .context attribute which is a
   187         """build form context values (the .context attribute which is a
   188         dictionary with field instance as key associated to a dictionary
   188         dictionary with field instance as key associated to a dictionary
   189         containing field 'name' (qualified), 'id', 'value' (for display, always
   189         containing field 'name' (qualified), 'id', 'value' (for display, always
   364             value = super(EntityFieldsForm, self).form_field_value(field,
   364             value = super(EntityFieldsForm, self).form_field_value(field,
   365                                                                    load_bytes)
   365                                                                    load_bytes)
   366         return value
   366         return value
   367 
   367 
   368     def form_default_renderer(self):
   368     def form_default_renderer(self):
   369         return self.vreg.select('formrenderers', self.form_renderer_id,
   369         return self.vreg['formrenderers'].select(
   370                                 self.req, rset=self.rset, row=self.row,
   370             self.form_renderer_id, self.req, rset=self.rset, row=self.row,
   371                                 col=self.col, entity=self.edited_entity)
   371             col=self.col, entity=self.edited_entity)
   372 
   372 
   373     def form_build_context(self, values=None):
   373     def form_build_context(self, values=None):
   374         """overriden to add edit[s|o] hidden fields and to ensure schema fields
   374         """overriden to add edit[s|o] hidden fields and to ensure schema fields
   375         have eidparam set to True
   375         have eidparam set to True
   376 
   376