equal
deleted
inserted
replaced
94 self.render_form(entity) |
94 self.render_form(entity) |
95 |
95 |
96 def render_form(self, entity): |
96 def render_form(self, entity): |
97 """fetch and render the form""" |
97 """fetch and render the form""" |
98 self.form_title(entity) |
98 self.form_title(entity) |
99 form = self._cw.vreg['forms'].select('edition', self._cw, rset=entity.cw_rset, |
99 form = self._cw.vreg['forms'].select('edition', self._cw, entity=entity, |
100 row=entity.cw_row, col=entity.cw_col, |
|
101 entity=entity, |
|
102 submitmsg=self.submited_message()) |
100 submitmsg=self.submited_message()) |
103 self.init_form(form, entity) |
101 self.init_form(form, entity) |
104 self.w(form.render()) |
102 self.w(form.render()) |
105 |
103 |
106 def init_form(self, form, entity): |
104 def init_form(self, form, entity): |
236 """ |
234 """ |
237 # XXX overriding formvid (eg __form_id) necessary to make work edition: |
235 # XXX overriding formvid (eg __form_id) necessary to make work edition: |
238 # the edit controller try to select the form with no rset but |
236 # the edit controller try to select the form with no rset but |
239 # entity=entity, and use this form to edit the entity. So we want |
237 # entity=entity, and use this form to edit the entity. So we want |
240 # edition form there but specifying formvid may have other undesired |
238 # edition form there but specifying formvid may have other undesired |
241 # side effect. Maybe we should provide another variable optinally |
239 # side effect. Maybe we should provide another variable optionally |
242 # telling which form the edit controller should select (eg difffers |
240 # telling which form the edit controller should select (eg difffers |
243 # between html generation / post handling form) |
241 # between html generation / post handling form) |
244 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
242 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
245 rset=self.cw_rset, |
243 rset=self.cw_rset, |
246 copy_nav_params=True, |
244 copy_nav_params=True, |