From 88ce860aa5bb707db4fb3b168dcdc43b7194d011 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 16 Jul 2010 15:26:01 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 4 ++++ plone/app/discussion/browser/comments.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 742dd94..ba11c04 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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] diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 4b8a108..1a9f38a 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -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()