diff --git a/application/views/blocks/captcha_form.tpl b/application/views/blocks/captcha_form.tpl index a0487c1..531645c 100644 --- a/application/views/blocks/captcha_form.tpl +++ b/application/views/blocks/captcha_form.tpl @@ -1,3 +1,3 @@ [{$smarty.block.parent}] -[{include file="oecaptcha.tpl"}] +[{include file="oecaptcha.tpl" labelCssClass="col-lg-2" inputCssClass="col-lg-10"}] diff --git a/application/views/blocks/captcha_form_forgotpwd.tpl b/application/views/blocks/captcha_form_forgotpwd.tpl new file mode 100644 index 0000000..5171b71 --- /dev/null +++ b/application/views/blocks/captcha_form_forgotpwd.tpl @@ -0,0 +1,3 @@ +[{$smarty.block.parent}] + +[{include file="oecaptcha.tpl" labelCssClass="col-md-3" inputCssClass="col-md-9"}] diff --git a/application/views/tpl/oecaptcha.tpl b/application/views/tpl/oecaptcha.tpl index b482fc4..be78fb2 100644 --- a/application/views/tpl/oecaptcha.tpl +++ b/application/views/tpl/oecaptcha.tpl @@ -2,9 +2,9 @@
- + -
+
[{if $oCaptcha->isImageVisible()}] diff --git a/controllers/oecaptchaforgotpwd.php b/controllers/oecaptchaforgotpwd.php new file mode 100644 index 0000000..7158f89 --- /dev/null +++ b/controllers/oecaptchaforgotpwd.php @@ -0,0 +1,44 @@ +getCaptcha()->passCaptcha()) { + return false; + } + + return parent::forgotpassword(); + } + + /** + * 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/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..062f6f5 100755 --- a/metadata.php +++ b/metadata.php @@ -39,7 +39,9 @@ $aModule = array( 'email' => '', 'extend' => array('details' => 'oe/captcha/controllers/oecaptchadetails', 'contact' => 'oe/captcha/controllers/oecaptchacontact', + 'forgotpwd' => 'oe/captcha/controllers/oecaptchaforgotpwd', '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,9 +54,11 @@ $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'), + array('template' => 'form/forgotpwd_email.tpl', 'block'=>'captcha_form', 'file'=>'/application/views/blocks/captcha_form_forgotpwd.tpl'), ), 'settings' => array( array('group' => 'main', 'name' => 'oecaptchakey', 'type' => 'str', 'value' => ''),