Skip to content

Commit deae520

Browse files
authored
Merge pull request #104 from magento-l3/PR-2023-02-07
Pr 2023 02 07
2 parents 4b60448 + 5faf815 commit deae520

File tree

17 files changed

+275
-357
lines changed

17 files changed

+275
-357
lines changed

ReCaptchaCheckout/view/frontend/web/js/model/place-order-mixin.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ define([
3030
});
3131
//Trigger ReCaptcha validation
3232
recaptchaRegistry.triggers['recaptcha-checkout-place-order']();
33-
//remove listener so that place order action is only triggered by the 'Place Order' button
34-
recaptchaRegistry.removeListener('recaptcha-checkout-place-order');
33+
34+
if (
35+
!recaptchaRegistry._isInvisibleType.hasOwnProperty('recaptcha-checkout-place-order') ||
36+
recaptchaRegistry._isInvisibleType['recaptcha-checkout-place-order'] === false
37+
) {
38+
//remove listener so that place order action is only triggered by the 'Place Order' button
39+
recaptchaRegistry.removeListener('recaptcha-checkout-place-order');
40+
}
41+
3542
return recaptchaDeferred;
3643
}
3744

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
10+
11+
<type name="Magento\Framework\View\Element\ButtonLockManager">
12+
<arguments>
13+
<argument name="buttonLockPool" xsi:type="array">
14+
<item name="contact_us_form_submit" xsi:type="object">Magento\ReCaptchaContact\Model\ButtonLock\ContactUsFormSubmit</item>
15+
</argument>
16+
</arguments>
17+
</type>
18+
19+
<virtualType name="Magento\ReCaptchaContact\Model\ButtonLock\ContactUsFormSubmit" type="Magento\ReCaptchaUi\Model\ButtonLock">
20+
<arguments>
21+
<argument name="buttonCode" xsi:type="string">contact_us_form_submit</argument>
22+
<argument name="reCaptchaId" xsi:type="string">contact</argument>
23+
</arguments>
24+
</virtualType>
25+
</config>

ReCaptchaCustomer/Plugin/Customer/DisableCreateAccountButton.php

Lines changed: 0 additions & 46 deletions
This file was deleted.

ReCaptchaCustomer/Plugin/Customer/DisableForgotPasswordButton.php

Lines changed: 0 additions & 46 deletions
This file was deleted.

ReCaptchaCustomer/Plugin/Customer/DisableLoginButton.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

ReCaptchaCustomer/Test/Unit/Plugin/Customer/DisableCreateAccountButtonTest.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

ReCaptchaCustomer/Test/Unit/Plugin/Customer/DisableForgotPasswordButtonTest.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

ReCaptchaCustomer/Test/Unit/Plugin/Customer/DisableLoginButtonTest.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)