Hide the moderation_enabled widget in the discussion control panel. We need plone.app.controlpanel > 2.1b1 for this, which is not shipped with Plone 3.x or 4.0.x.
svn path=/plone.app.discussion/branches/1.x/; revision=46989
This commit is contained in:
parent
57d4dbd32f
commit
5cac8b7a1b
@ -1,7 +1,7 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
1.0RC1 (unreleased)
|
||||
1.0RC1 (2011-01-22)
|
||||
-------------------
|
||||
|
||||
- Always show existing comments, even if commenting is disabled.
|
||||
|
@ -19,7 +19,7 @@ from zope.app.component.hooks import getSite
|
||||
|
||||
from zope.component import getMultiAdapter, queryUtility
|
||||
|
||||
from z3c.form import button
|
||||
from z3c.form import button, interfaces
|
||||
from z3c.form.browser.checkbox import SingleCheckBoxFieldWidget
|
||||
|
||||
from plone.app.discussion.interfaces import IDiscussionSettings, _
|
||||
@ -66,6 +66,14 @@ class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
|
||||
self.widgets['user_notification_enabled'].label = \
|
||||
_(u"User Email Notification")
|
||||
|
||||
# Hide the moderation_enabled widget. We need plone.app.controlpanel
|
||||
# > 2.1b1 in order to make sure that the proper events are fired when
|
||||
# the workflow for discussion items is changed in the types control
|
||||
# panel. Though, Plone 3 and 4.0 ship with an older version of
|
||||
# p.a.controlpanel that do not fire this event properly.
|
||||
# http://dev.plone.org/plone/changeset/46270/plone.app.controlpanel/trunk
|
||||
self.widgets['moderation_enabled'].mode = interfaces.HIDDEN_MODE
|
||||
|
||||
@button.buttonAndHandler(_('Save'), name='save')
|
||||
def handleSave(self, action):
|
||||
data, errors = self.extractData()
|
||||
|
Loading…
Reference in New Issue
Block a user