equal
deleted
inserted
replaced
88 # don't use outofcontext view or any other that may contain inline |
88 # don't use outofcontext view or any other that may contain inline |
89 # edition form |
89 # edition form |
90 w(u'<li>%s</li>' % tags.a(entity.view('textoutofcontext'), |
90 w(u'<li>%s</li>' % tags.a(entity.view('textoutofcontext'), |
91 href=entity.absolute_url())) |
91 href=entity.absolute_url())) |
92 w(u'</ul>\n') |
92 w(u'</ul>\n') |
93 w(form.render()) |
93 form.render(w=self.w) |
94 |
94 |
95 |
95 |
96 class EditionFormView(FormViewMixIn, EntityView): |
96 class EditionFormView(FormViewMixIn, EntityView): |
97 """display primary entity edition form""" |
97 """display primary entity edition form""" |
98 __regid__ = 'edition' |
98 __regid__ = 'edition' |
110 """fetch and render the form""" |
110 """fetch and render the form""" |
111 self.form_title(entity) |
111 self.form_title(entity) |
112 form = self._cw.vreg['forms'].select('edition', self._cw, entity=entity, |
112 form = self._cw.vreg['forms'].select('edition', self._cw, entity=entity, |
113 submitmsg=self.submited_message()) |
113 submitmsg=self.submited_message()) |
114 self.init_form(form, entity) |
114 self.init_form(form, entity) |
115 self.w(form.render()) |
115 form.render(w=self.w) |
116 |
116 |
117 def init_form(self, form, entity): |
117 def init_form(self, form, entity): |
118 """customize your form before rendering here""" |
118 """customize your form before rendering here""" |
119 pass |
119 pass |
120 |
120 |
256 # between html generation / post handling form) |
256 # between html generation / post handling form) |
257 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
257 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
258 rset=self.cw_rset, |
258 rset=self.cw_rset, |
259 copy_nav_params=True, |
259 copy_nav_params=True, |
260 formvid='edition') |
260 formvid='edition') |
261 self.w(form.render()) |
261 form.render(w=self.w) |
262 |
262 |
263 |
263 |
264 # click and edit handling ('reledit') ########################################## |
264 # click and edit handling ('reledit') ########################################## |
265 |
265 |
266 ClickAndEditFormView = class_moved(reledit.ClickAndEditFormView) |
266 ClickAndEditFormView = class_moved(reledit.ClickAndEditFormView) |