Akismet spam protection plugin support added (collective.akismet).

svn path=/plone.app.discussion/trunk/; revision=37136
This commit is contained in:
Timo Stollenwerk
2010-06-10 13:11:33 +00:00
parent 92766752c4
commit 926314ea49
2 changed files with 20 additions and 4 deletions
+3 -2
View File
@@ -6,7 +6,7 @@ from persistent import Persistent
from Products.CMFCore.utils import getToolByName
from z3c.form import validator
from z3c.form import interfaces, validator
from z3c.form.field import Fields
from zope import interface, schema
@@ -70,4 +70,5 @@ class CaptchaExtender(extensible.FormExtender):
elif self.captcha == 'recaptcha':
from plone.formwidget.recaptcha import ReCaptchaFieldWidget
self.form.fields['captcha'].widgetFactory = ReCaptchaFieldWidget
elif self.captcha == 'akismet':
self.form.fields['captcha'].mode = interfaces.HIDDEN_MODE