diff --git a/controllers/oecaptchanewsletter.php b/controllers/oecaptchanewsletter.php new file mode 100644 index 0000000..caf7000 --- /dev/null +++ b/controllers/oecaptchanewsletter.php @@ -0,0 +1,44 @@ +getCaptcha()->passCaptcha()) { + return false; + } + + return parent::send(); + } + + /** + * Template variable getter. Returns object of handling CAPTCHA image + * + * @return object + */ + public function getCaptcha() + { + if ($this->captcha === null) { + $this->captcha = oxNew('oeCaptcha'); + } + + return $this->captcha; + } + +} diff --git a/metadata.php b/metadata.php index 33ce471..ce582b3 100755 --- a/metadata.php +++ b/metadata.php @@ -40,6 +40,7 @@ $aModule = array( 'extend' => array('details' => 'oe/captcha/controllers/oecaptchadetails', 'contact' => 'oe/captcha/controllers/oecaptchacontact', 'invite' => 'oe/captcha/controllers/oecaptchainvite', + 'newsletter' => 'oe/captcha/controllers/oecaptchanewsletter', 'pricealarm' => 'oe/captcha/controllers/oecaptchapricealarm', 'suggest' => 'oe/captcha/controllers/oecaptchasuggest', 'oxwarticledetails' => 'oe/captcha/application/component/widget/oecaptchawarticledetails'), @@ -52,6 +53,7 @@ $aModule = array( ), 'blocks' => array( array('template' => 'form/contact.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), + array('template' => 'form/newsletter.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), array('template' => 'form/privatesales/invite.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), array('template' => 'form/pricealarm.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'), array('template' => 'form/suggest.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form.tpl'),