File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed
ReCaptchaAdminUi/Block/Adminhtml/System/Config/Form/Field
ReCaptchaCustomer/etc/adminhtml
ReCaptchaUser/etc/adminhtml Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \ReCaptchaAdminUi \Block \Adminhtml \System \Config \Form \Field ;
9
+
10
+ use Magento \Config \Block \System \Config \Form \Field ;
11
+ use Magento \Framework \Data \Form \Element \AbstractElement ;
12
+
13
+ /**
14
+ * Class for Notice
15
+ */
16
+ class Notice extends Field
17
+ {
18
+
19
+ /**
20
+ * Render text
21
+ *
22
+ * @param AbstractElement $element
23
+ *
24
+ * @return string
25
+ */
26
+ public function render (AbstractElement $ element )
27
+ {
28
+ $ html = '<td colspan="4"> ' . '<strong> ' . __ ('Important: ' ) . ' ' . '</strong> '
29
+ . ' <span> ' . __ ('Please note, for reCAPTCHA to be enabled,
30
+ the valid "Google API Website Key" and "Google API Secret Key" fields are required. ' ) . '</span> ' . '</td> ' ;
31
+
32
+ return $ this ->_decorateRowHtml ($ element , $ html );
33
+ }
34
+ }
Original file line number Diff line number Diff line change 10
10
<system >
11
11
<section id =" recaptcha_frontend" >
12
12
<group id =" type_for" >
13
+ <field id =" recaptcha_frontend_info_heading" translate =" label" sortOrder =" 100" showInDefault =" 1"
14
+ showInWebsite =" 1" showInStore =" 0" >
15
+ <frontend_model >Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice</frontend_model >
16
+ </field >
13
17
<field id =" customer_login" translate =" label" type =" select" sortOrder =" 110" showInDefault =" 1"
14
18
showInWebsite =" 1" showInStore =" 0" canRestore =" 1" >
15
19
<label >Enable for Customer Login</label >
Original file line number Diff line number Diff line change 10
10
<system >
11
11
<section id =" recaptcha_backend" >
12
12
<group id =" type_for" >
13
- <field id =" user_login" translate =" label" type =" select" sortOrder =" 100" showInDefault =" 1"
13
+ <field id =" recaptcha_backend_info_heading" translate =" label" sortOrder =" 100" showInDefault =" 1"
14
+ showInWebsite =" 0" showInStore =" 0" >
15
+ <frontend_model >Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice</frontend_model >
16
+ </field >
17
+ <field id =" user_login" translate =" label" type =" select" sortOrder =" 110" showInDefault =" 1"
14
18
showInWebsite =" 0" showInStore =" 0" canRestore =" 1" >
15
19
<label >Enable for Login</label >
16
20
<source_model >Magento\ReCaptchaAdminUi\Model\OptionSource\Type</source_model >
17
21
</field >
18
22
19
- <field id =" user_forgot_password" translate =" label" type =" select" sortOrder =" 110 " showInDefault =" 1"
23
+ <field id =" user_forgot_password" translate =" label" type =" select" sortOrder =" 120 " showInDefault =" 1"
20
24
showInWebsite =" 0" showInStore =" 0" canRestore =" 1" >
21
25
<label >Enable for Forgot Password</label >
22
26
<source_model >Magento\ReCaptchaAdminUi\Model\OptionSource\Type</source_model >
You can’t perform that action at this time.
0 commit comments