From ae0b9486b785d23deee282bb67dc428db0848b7f Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 4 Aug 2009 19:30:12 +0000 Subject: [PATCH] remove unnecessary wrap_form. svn path=/plone.app.discussion/trunk/; revision=28358 --- plone/app/discussion/browser/comments.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 8759dfa..4b99892 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -199,7 +199,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form): # a cancel button that is handled by a jQuery method. pass -class ViewletFormWrapper(ViewletBase, layout.FormWrapper): +class CommentsViewlet(ViewletBase, layout.FormWrapper): form = CommentForm @@ -207,7 +207,7 @@ class ViewletFormWrapper(ViewletBase, layout.FormWrapper): return ViewPageTemplateFile('comments.pt').__of__(self)(self) def __init__(self, context, request, view, manager): - super(ViewletFormWrapper, self).__init__(context, request, view, manager) + super(CommentsViewlet, self).__init__(context, request, view, manager) if self.form is not None: self.form_instance = self.form(self.context.aq_inner, self.request) self.form_instance.__name__ = self.__name__ @@ -299,6 +299,4 @@ class ViewletFormWrapper(ViewletBase, layout.FormWrapper): # before we can call toLocalizedTime. util = getToolByName(self.context, 'translation_service') zope_time = DateTime(time.year, time.month, time.day, time.hour, time.minute, time.second) - return util.toLocalizedTime(zope_time, long_format=True) - -CommentsViewlet = layout.wrap_form(CommentForm, __wrapper_class=ViewletFormWrapper) \ No newline at end of file + return util.toLocalizedTime(zope_time, long_format=True) \ No newline at end of file