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
This commit is contained in:
Timo Stollenwerk 2010-03-11 19:23:02 +00:00
parent 0fc0bce46e
commit 2301565e27
5 changed files with 23 additions and 23 deletions

View File

@ -8,10 +8,6 @@ Changelog
attention. attention.
[timo] [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) * Make p.a.d. work with the recent version of plone.z3cform (0.5.10)
[timo] [timo]

View File

@ -67,7 +67,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
# Widgets # Widgets
self.widgets['in_reply_to'].mode = interfaces.HIDDEN_MODE self.widgets['in_reply_to'].mode = interfaces.HIDDEN_MODE
self.widgets['text'].addClass("autoresize") self.widgets['text'].addClass("autoresize")
self.widgets['author_notification'].label = _(u"") #self.widgets['author_notification'].label = _(u"")
# Anonymous / Logged-in # Anonymous / Logged-in
portal_membership = getToolByName(self.context, 'portal_membership') 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 self.widgets['author_email'].mode = interfaces.HIDDEN_MODE
# Notification enabled # Notification enabled
registry = queryUtility(IRegistry) #registry = queryUtility(IRegistry)
settings = registry.forInterface(IDiscussionSettings) #settings = registry.forInterface(IDiscussionSettings)
if not settings.user_notification_enabled: #if not settings.user_notification_enabled:
self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE # self.widgets['author_notification'].mode = interfaces.HIDDEN_MODE
def updateActions(self): def updateActions(self):
super(CommentForm, self).updateActions() super(CommentForm, self).updateActions()

View File

@ -30,7 +30,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
self.fields['anonymous_comments'].widgetFactory = SingleCheckBoxFieldWidget self.fields['anonymous_comments'].widgetFactory = SingleCheckBoxFieldWidget
self.fields['show_commenter_image'].widgetFactory = SingleCheckBoxFieldWidget self.fields['show_commenter_image'].widgetFactory = SingleCheckBoxFieldWidget
self.fields['moderator_notification_enabled'].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): def updateWidgets(self):
super(DiscussionSettingsEditForm, self).updateWidgets() super(DiscussionSettingsEditForm, self).updateWidgets()
@ -38,7 +38,7 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
self.widgets['anonymous_comments'].label = _(u"Anonymous Comments") self.widgets['anonymous_comments'].label = _(u"Anonymous Comments")
self.widgets['show_commenter_image'].label = _(u"Commenter Image") self.widgets['show_commenter_image'].label = _(u"Commenter Image")
self.widgets['moderator_notification_enabled'].label = _(u"Moderator Email Notification") 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): class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper):

View File

@ -68,16 +68,16 @@ class IDiscussionSettings(Interface):
required=False, required=False,
default=False) default=False)
user_notification_enabled = schema.Bool( #user_notification_enabled = schema.Bool(
title=_(u"label_user_notification_enabled", # title=_(u"label_user_notification_enabled",
default=u"Enable user email notification"), # default=u"Enable user email notification"),
description=_(u"help_user_notification_enabled", # description=_(u"help_user_notification_enabled",
default=u"If selected, users can " # default=u"If selected, users can "
"choose to be notified " # "choose to be notified "
"of new comments by " # "of new comments by "
"email."), # "email."),
required=False, # required=False,
default=False) # default=False)
class IConversation(IIterableMapping): class IConversation(IIterableMapping):

View File

@ -36,13 +36,15 @@
zope.lifecycleevent.interfaces.IObjectRemovedEvent" zope.lifecycleevent.interfaces.IObjectRemovedEvent"
handler=".tool.unindex_object" handler=".tool.unindex_object"
/> />
<!--
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment
zope.lifecycleevent.interfaces.IObjectAddedEvent" zope.lifecycleevent.interfaces.IObjectAddedEvent"
handler=".comment.notify_user" handler=".comment.notify_user"
/> />
-->
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment
zope.lifecycleevent.interfaces.IObjectAddedEvent" zope.lifecycleevent.interfaces.IObjectAddedEvent"
@ -83,11 +85,13 @@
handler=".tool.unindex_object" handler=".tool.unindex_object"
/> />
<!--
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectAddedEvent" zope.app.container.interfaces.IObjectAddedEvent"
handler=".comment.notify_user" handler=".comment.notify_user"
/> />
-->
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment