Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
faonni committed Jan 22, 2017
1 parent 2365c39 commit e526a01
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Observer/ValidateObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,16 @@ public function execute(Observer $observer)
}
}
}

$message = new Phrase('There was an error with the reCAPTCHA code, please try again.');
$this->_messageManager->addError($message);

/** @var \Magento\Framework\App\Action\Action $controller */
$controller = $observer->getEvent()->getControllerAction();

$this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
$this->_redirect->redirect($controller->getResponse(), $this->_helper->getRedirectUrl($action));
$this->_redirect->redirect($controller->getResponse(), $this->_helper->getRedirectUrl($action));
return $this;
}
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "faonni/module-re-captcha",
"description": "Extension is integrate Google Recaptcha with your Magento2 store.",
"type": "magento2-module",
"version": "2.0.1",
"version": "2.0.2",
"license": [
"OSL-3.0"
],
Expand Down
4 changes: 2 additions & 2 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
<item name="handle" xsi:type="string">recaptcha_form_additional_info</item>
<item name="post" xsi:type="string">customer_account_forgotpasswordpost</item>
</item>
<item name="contacts_index_index" xsi:type="array">
<item name="contact_index_index" xsi:type="array">
<item name="label" xsi:type="string">Contact Us</item>
<item name="handle" xsi:type="string">recaptcha_form_additional_info</item>
<item name="post" xsi:type="string">contacts_index_post</item>
<item name="post" xsi:type="string">contact_index_post</item>
</item>
</argument>
</arguments>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Faonni_ReCaptcha" setup_version="2.0.1"/>
<module name="Faonni_ReCaptcha" setup_version="2.0.2"/>
</config>
2 changes: 1 addition & 1 deletion view/frontend/layout/recaptcha_form_additional_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="head.additional" ifconfig="contact/map/enabled">
<referenceContainer name="head.additional">
<block class="Faonni\ReCaptcha\Block\Head" name="faonni.recaptcha.head" template="Faonni_ReCaptcha::head.phtml" />
</referenceContainer>
<referenceContainer name="form.additional.info">
Expand Down
3 changes: 3 additions & 0 deletions view/frontend/web/css/source/_module.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.customer-account-login .g-recaptcha {
margin-bottom: 40px;
}

0 comments on commit e526a01

Please sign in to comment.