diff --git a/config.php b/config.php index 2bdf1413..2ba7b93d 100644 --- a/config.php +++ b/config.php @@ -125,14 +125,10 @@ $config = array( 'smtp_secure' => '', // What kind of encryption to use on the SMTP connection. Options: '', 'ssl' (GMail) or 'tls' (Microsoft Outlook) 'smtp_debug' => false, // set true to debug (you will see more info in error.log) - // reCAPTCHA (prevent spam bots) + // reCAPTCHA v3 (prevent spam bots) 'recaptcha_enabled' => false, // enable recaptcha verification code - 'recaptcha_type' => 'v3', // 'v2-checkbox', 'v2-invisible', 'v3' 'recaptcha_site_key' => '', // get your own site and secret keys at https://www.google.com/recaptcha 'recaptcha_secret_key' => '', - // following option apply only for ReCaptcha v2-checkbox - 'recaptcha_theme' => 'light', // light, dark - // following option apply only for ReCaptcha v3 // min score for validation, between 0 - 1.0 // https://developers.google.com/recaptcha/docs/v3#interpreting_the_score 'recaptcha_v3_min_score' => 0.5, diff --git a/system/functions.php b/system/functions.php index 891a2ab3..c4b51046 100644 --- a/system/functions.php +++ b/system/functions.php @@ -497,7 +497,7 @@ function template_header($is_admin = false) '; if(config('recaptcha_enabled')) { - $ret .= ''; + $ret .= ''; } return $ret; diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index 9f8e83b4..2c4b9654 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -105,23 +105,7 @@ {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS') }} {% if config.recaptcha_enabled %} - {% if config.recaptcha_type == 'v3' %} - - {% elseif config.recaptcha_type == 'v2-invisible' %} -
- {% elseif config.recaptcha_type == 'v2-checkbox' %} - - - Verification: - - -
- - - {% if errors.verification is defined %} - {{ errors.verification }} - {% endif %} - {% endif %} + {% endif %} {{ hook('HOOK_ACCOUNT_CREATE_AFTER_RECAPTCHA') }} @@ -340,7 +324,7 @@ {{ hook('HOOK_ACCOUNT_CREATE_AFTER_FORM') }} -{% if config.recaptcha_enabled and config.recaptcha_type == 'v3' %} +{% if config.recaptcha_enabled %} {% set action = 'register' %} - {{ include('google_recaptcha_v3.html.twig') }} -{% endif %} \ No newline at end of file + {{ include('google_recaptcha.html.twig') }} +{% endif %} diff --git a/system/templates/account.login.html.twig b/system/templates/account.login.html.twig index 40cd0f9c..cc10dd67 100644 --- a/system/templates/account.login.html.twig +++ b/system/templates/account.login.html.twig @@ -40,20 +40,7 @@ Please enter your account {{ account|lower }} and your password.
Remember me {% if config.recaptcha_enabled %} - {% if config.recaptcha_type == 'v3' %} - {% elseif config.recaptcha_type == 'v2-invisible' %} -
- {% elseif config.recaptcha_type == 'v2-checkbox' %} - - - Verification: - - -
- - - {% endif %} {% endif %} {% if error is not null %} {{ error }} @@ -90,7 +77,7 @@ Please enter your account {{ account|lower }} and your password.
Remember me {% if config.recaptcha_enabled %} - {% if config.recaptcha_type == 'v3' %} - - {% elseif config.recaptcha_type == 'v2-invisible' %} -
- {% elseif config.recaptcha_type == 'v2-checkbox' %} - - - Verification: - - -
- - - {% endif %} + {% endif %}
@@ -158,7 +145,7 @@
-{% if config.recaptcha_enabled and config.recaptcha_type == 'v3' %} +{% if config.recaptcha_enabled %} {% set action = 'login' %} - {{ include('google_recaptcha_v3.html.twig') }} -{% endif %} \ No newline at end of file + {{ include('google_recaptcha.html.twig') }} +{% endif %}