Move the Akismet validator error message to the top.

svn path=/plone.app.discussion/trunk/; revision=37272
This commit is contained in:
Timo Stollenwerk 2010-06-14 12:25:56 +00:00
parent ac6865311d
commit 29015324f2

View File

@ -71,4 +71,8 @@ class CaptchaExtender(extensible.FormExtender):
from plone.formwidget.recaptcha import ReCaptchaFieldWidget from plone.formwidget.recaptcha import ReCaptchaFieldWidget
self.form.fields['captcha'].widgetFactory = ReCaptchaFieldWidget self.form.fields['captcha'].widgetFactory = ReCaptchaFieldWidget
elif self.captcha == 'akismet': elif self.captcha == 'akismet':
# Hide the captcha field and move the Akismet validator error
# message to the top
self.form.fields['captcha'].mode = interfaces.HIDDEN_MODE self.form.fields['captcha'].mode = interfaces.HIDDEN_MODE
self.move('captcha', before='author_name', prefix='')