From 2dbc337fc75eb7230828c284fe4a6b40432e136c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Tue, 13 Jul 2010 09:20:32 +0000 Subject: [PATCH] Remove unnecessary imports from captcha.py. svn path=/plone.app.discussion/trunk/; revision=37760 --- plone/app/discussion/browser/captcha.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/plone/app/discussion/browser/captcha.py b/plone/app/discussion/browser/captcha.py index 579e121..32b9298 100644 --- a/plone/app/discussion/browser/captcha.py +++ b/plone/app/discussion/browser/captcha.py @@ -6,29 +6,26 @@ from persistent import Persistent from Products.CMFCore.utils import getToolByName -from z3c.form import interfaces, validator +from z3c.form import interfaces from z3c.form.field import Fields -from zope import interface, schema +from zope import interface from zope.annotation import factory -from zope.component import adapts, provideAdapter, queryUtility +from zope.component import adapts, queryUtility from zope.publisher.interfaces.browser import IDefaultBrowserLayer -from zope.interface import Interface, implements +from zope.interface import Interface from plone.registry.interfaces import IRegistry from plone.z3cform.fieldsets import extensible -from plone.z3cform.fieldsets.interfaces import IFormExtender from plone.app.discussion.browser.comments import CommentForm from plone.app.discussion.comment import Comment from plone.app.discussion.interfaces import IDiscussionSettings, ICaptcha -from plone.app.discussion.browser.validator import CaptchaValidator - class Captcha(Persistent): """Captcha input field. @@ -70,9 +67,6 @@ class CaptchaExtender(extensible.FormExtender): elif self.captcha == 'recaptcha': 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 + else: self.form.fields['captcha'].mode = interfaces.HIDDEN_MODE - self.move('captcha', before='author_name', prefix='')