From 2301565e27b8db321f4f31f14f1b7d493588c7ab Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 11 Mar 2010 19:23:02 +0000 Subject: [PATCH] remove the user notification feature for now, since it requires the current z3c.form trunk and does not work with the latest release on PyPi. svn path=/plone.app.discussion/trunk/; revision=34696 --- CHANGES.txt | 4 ---- plone/app/discussion/browser/comments.py | 10 +++++----- plone/app/discussion/browser/controlpanel.py | 4 ++-- plone/app/discussion/interfaces.py | 20 ++++++++++---------- plone/app/discussion/subscribers.zcml | 8 ++++++-- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index dcf9cd7..9c201cb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,10 +8,6 @@ Changelog attention. [timo] -* New feature: As a commenter, I can enable/disable email notification of - additional comments on this object - [timo] - * Make p.a.d. work with the recent version of plone.z3cform (0.5.10) [timo] diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index e73dfcd..5e25941 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -67,7 +67,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form): # Widgets self.widgets['in_reply_to'].mode = interfaces.HIDDEN_MODE self.widgets['text'].addClass("autoresize") - self.widgets['author_notification'].label = _(u"") + #self.widgets['author_notification'].label = _(u"") # Anonymous / Logged-in portal_membership = getToolByName(self.context, 'portal_membership') @@ -76,10 +76,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form): self.widgets['author_email'].mode = interfaces.HIDDEN_MODE # Notification enabled - registry = queryUtility(IRegistry) - settings = registry.forInterface(IDiscussionSettings) - if not settings.user_notification_enabled: - self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE + #registry = queryUtility(IRegistry) + #settings = registry.forInterface(IDiscussionSettings) + #if not settings.user_notification_enabled: + # self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE def updateActions(self): super(CommentForm, self).updateActions() diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index ec4bc20..328bfec 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -30,7 +30,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm): self.fields['anonymous_comments'].widgetFactory = SingleCheckBoxFieldWidget self.fields['show_commenter_image'].widgetFactory = SingleCheckBoxFieldWidget self.fields['moderator_notification_enabled'].widgetFactory = SingleCheckBoxFieldWidget - self.fields['user_notification_enabled'].widgetFactory = SingleCheckBoxFieldWidget + #self.fields['user_notification_enabled'].widgetFactory = SingleCheckBoxFieldWidget def updateWidgets(self): super(DiscussionSettingsEditForm, self).updateWidgets() @@ -38,7 +38,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm): self.widgets['anonymous_comments'].label = _(u"Anonymous Comments") self.widgets['show_commenter_image'].label = _(u"Commenter Image") self.widgets['moderator_notification_enabled'].label = _(u"Moderator Email Notification") - self.widgets['user_notification_enabled'].label = _(u"User Email Notification") + #self.widgets['user_notification_enabled'].label = _(u"User Email Notification") class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper): diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index 00354bf..f96968a 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -68,16 +68,16 @@ class IDiscussionSettings(Interface): required=False, default=False) - user_notification_enabled = schema.Bool( - title=_(u"label_user_notification_enabled", - default=u"Enable user email notification"), - description=_(u"help_user_notification_enabled", - default=u"If selected, users can " - "choose to be notified " - "of new comments by " - "email."), - required=False, - default=False) + #user_notification_enabled = schema.Bool( + # title=_(u"label_user_notification_enabled", + # default=u"Enable user email notification"), + # description=_(u"help_user_notification_enabled", + # default=u"If selected, users can " + # "choose to be notified " + # "of new comments by " + # "email."), + # required=False, + # default=False) class IConversation(IIterableMapping): diff --git a/plone/app/discussion/subscribers.zcml b/plone/app/discussion/subscribers.zcml index 8b50424..67cd8f1 100644 --- a/plone/app/discussion/subscribers.zcml +++ b/plone/app/discussion/subscribers.zcml @@ -36,13 +36,15 @@ zope.lifecycleevent.interfaces.IObjectRemovedEvent" handler=".tool.unindex_object" /> - + + + +