Remove the hard coded check for title and text when the comment form is submitted. This allows integrators to write schema extenders that remove the title from the comment form.
svn path=/plone.app.discussion/trunk/; revision=37341
This commit is contained in:
@@ -4,6 +4,11 @@ Changelog
|
|||||||
1.0b5 (unreleased)
|
1.0b5 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
* Remove the hard coded check for title and text when the comment form is
|
||||||
|
submitted. This allows integrators to write schema extenders that remove the
|
||||||
|
title from the comment form.
|
||||||
|
[timo]
|
||||||
|
|
||||||
* Move captcha registration to its own captcha.zcml file.
|
* Move captcha registration to its own captcha.zcml file.
|
||||||
[timo]
|
[timo]
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
|||||||
def handleComment(self, action):
|
def handleComment(self, action):
|
||||||
context = aq_inner(self.context)
|
context = aq_inner(self.context)
|
||||||
wf = getToolByName(context, 'portal_workflow')
|
wf = getToolByName(context, 'portal_workflow')
|
||||||
|
|
||||||
data, errors = self.extractData()
|
data, errors = self.extractData()
|
||||||
|
if errors:
|
||||||
|
return
|
||||||
|
|
||||||
title = u""
|
title = u""
|
||||||
text = u""
|
text = u""
|
||||||
@@ -128,10 +131,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'title' in data and 'text' in data:
|
if 'title' in data:
|
||||||
title = data['title']
|
title = data['title']
|
||||||
|
if 'text' in data:
|
||||||
text = data['text']
|
text = data['text']
|
||||||
|
|
||||||
if 'author_name' in data:
|
if 'author_name' in data:
|
||||||
author_name = data['author_name']
|
author_name = data['author_name']
|
||||||
if 'author_username' in data:
|
if 'author_username' in data:
|
||||||
|
|||||||
Reference in New Issue
Block a user