From 29015324f2e8278d6cb30b3d62831866d8472c52 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 14 Jun 2010 12:25:56 +0000 Subject: [PATCH] Move the Akismet validator error message to the top. svn path=/plone.app.discussion/trunk/; revision=37272 --- plone/app/discussion/browser/captcha.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plone/app/discussion/browser/captcha.py b/plone/app/discussion/browser/captcha.py index ff86312..579e121 100644 --- a/plone/app/discussion/browser/captcha.py +++ b/plone/app/discussion/browser/captcha.py @@ -71,4 +71,8 @@ class CaptchaExtender(extensible.FormExtender): from plone.formwidget.recaptcha import ReCaptchaFieldWidget self.form.fields['captcha'].widgetFactory = ReCaptchaFieldWidget 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.move('captcha', before='author_name', prefix='') +