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:
parent
6e98edf54f
commit
12589d9fd2
@ -4,6 +4,11 @@ Changelog
|
||||
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.
|
||||
[timo]
|
||||
|
||||
|
@ -102,7 +102,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
||||
def handleComment(self, action):
|
||||
context = aq_inner(self.context)
|
||||
wf = getToolByName(context, 'portal_workflow')
|
||||
|
||||
data, errors = self.extractData()
|
||||
if errors:
|
||||
return
|
||||
|
||||
title = u""
|
||||
text = u""
|
||||
@ -128,10 +131,10 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
|
||||
else:
|
||||
return
|
||||
|
||||
if 'title' in data and 'text' in data:
|
||||
if 'title' in data:
|
||||
title = data['title']
|
||||
if 'text' in data:
|
||||
text = data['text']
|
||||
|
||||
if 'author_name' in data:
|
||||
author_name = data['author_name']
|
||||
if 'author_username' in data:
|
||||
|
Loading…
Reference in New Issue
Block a user