diff -r 000000000000 -r 4eba9c11703f web/Zend/Form/Decorator/Captcha.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Form/Decorator/Captcha.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,72 @@ +getElement(); + if (!method_exists($element, 'getCaptcha')) { + return $content; + } + + $view = $element->getView(); + if (null === $view) { + return $content; + } + + $placement = $this->getPlacement(); + $separator = $this->getSeparator(); + + $captcha = $element->getCaptcha(); + $markup = $captcha->render($view, $element); + switch ($placement) { + case 'PREPEND': + $content = $markup . $separator . $content; + break; + case 'APPEND': + default: + $content = $content . $separator . $markup; + } + return $content; + } +}