Use self.form instead of CommentForm for the CommentsViewlet update method so integrators don't have to override the viewlet's update method. [Matous]

svn path=/plone.app.discussion/trunk/; revision=37916
This commit is contained in:
Timo Stollenwerk 2010-07-16 15:26:01 +00:00
parent 85d5b823b0
commit 88ce860aa5
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,10 @@ Changelog
1.0b5 (unreleased)
------------------
* Use self.form instead of CommentForm for the CommentsViewlet update method so
integrators don't have to override the viewlet's update method.
[Matous]
* Make sure the form fields in the reply form are always placed under the field
labels.
[timo]

View File

@ -205,7 +205,7 @@ class CommentsViewlet(ViewletBase):
def update(self):
super(CommentsViewlet, self).update()
z2.switch_on(self, request_layer=IFormLayer)
self.form = CommentForm(aq_inner(self.context), self.request)
self.form = self.form(aq_inner(self.context), self.request)
if HAS_WRAPPED_FORM:
alsoProvides(self.form, IWrappedForm)
self.form.update()