File tree Expand file tree Collapse file tree 5 files changed +55
-2
lines changed
Block/Adminhtml/System/Config/Form/Field
view/adminhtml/web/css/source
ReCaptchaUser/etc/adminhtml Expand file tree Collapse file tree 5 files changed +55
-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"><p class=" ' . $ element ->getId () . '_notice"> ' . '<strong> ' . __ ('Important: ' )
29
+ . ' ' . '</strong> ' . ' <span> ' . __ ('Please note, for reCAPTCHA to be enabled,
30
+ the valid "Google API Website Key" and "Google API Secret Key" fields are required. ' ) . '</span> ' . '</p></td> ' ;
31
+
32
+ return $ this ->_decorateRowHtml ($ element , $ html );
33
+ }
34
+ }
Original file line number Diff line number Diff line change 4
4
"require" : {
5
5
"php" : " ~7.3.0||~7.4.0" ,
6
6
"magento/framework" : " *" ,
7
+ "magento/module-config" : " *" ,
7
8
"magento/module-re-captcha-ui" : " *"
8
9
},
9
10
"type" : " magento2-module" ,
Original file line number Diff line number Diff line change 22
22
<group id =" type_for" translate =" label" type =" text" sortOrder =" 1000" showInDefault =" 1" showInWebsite =" 0"
23
23
showInStore =" 0" >
24
24
<label >Admin Panel</label >
25
+ <field id =" recaptcha_backend_info_heading" translate =" label" sortOrder =" 100" showInDefault =" 1"
26
+ showInWebsite =" 0" showInStore =" 0" >
27
+ <frontend_model >Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice</frontend_model >
28
+ </field >
25
29
</group >
26
30
</section >
27
31
35
39
<group id =" type_for" translate =" label" type =" text" sortOrder =" 1000" showInDefault =" 1" showInWebsite =" 1"
36
40
showInStore =" 0" >
37
41
<label >Storefront</label >
42
+ <field id =" recaptcha_frontend_info_heading" translate =" label" sortOrder =" 100" showInDefault =" 1"
43
+ showInWebsite =" 1" showInStore =" 0" >
44
+ <frontend_model >Magento\ReCaptchaAdminUi\Block\Adminhtml\System\Config\Form\Field\Notice</frontend_model >
45
+ </field >
38
46
</group >
39
47
</section >
40
48
</system >
Original file line number Diff line number Diff line change
1
+ /* *
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+ .recaptcha_backend_type_for_recaptcha_backend_info_heading_notice ,
6
+ .recaptcha_frontend_type_for_recaptcha_frontend_info_heading_notice {
7
+ strong {
8
+ color : @grid-severity-critical-color ;
9
+ }
10
+ }
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 =" user_login" translate =" label" type =" select" sortOrder =" 110 " showInDefault =" 1"
14
14
showInWebsite =" 0" showInStore =" 0" canRestore =" 1" >
15
15
<label >Enable for Login</label >
16
16
<source_model >Magento\ReCaptchaAdminUi\Model\OptionSource\Type</source_model >
17
17
</field >
18
18
19
- <field id =" user_forgot_password" translate =" label" type =" select" sortOrder =" 110 " showInDefault =" 1"
19
+ <field id =" user_forgot_password" translate =" label" type =" select" sortOrder =" 120 " showInDefault =" 1"
20
20
showInWebsite =" 0" showInStore =" 0" canRestore =" 1" >
21
21
<label >Enable for Forgot Password</label >
22
22
<source_model >Magento\ReCaptchaAdminUi\Model\OptionSource\Type</source_model >
You can’t perform that action at this time.
0 commit comments