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:
@@ -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()
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user