From 6a3bb72a250834c936490ee65e67a9428b04f260 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Mon, 26 Apr 2021 23:29:47 +0100 Subject: [PATCH] Remove warning about reCaptcha missing key from contribution page --- CRM/Contribute/Form/Contribution/Main.php | 3 --- CRM/Contribute/Form/ContributionBase.php | 11 ----------- templates/CRM/Contribute/Form/Contribution/Main.tpl | 6 ------ 3 files changed, 20 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 4af70d3c8e..3efe523d92 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -294,9 +294,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu if (!$this->_userID) { CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($this); } - else { - $this->displayCaptchaWarning(); - } } // Build payment processor form diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index c90648d8ea..58e15df2af 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -820,17 +820,6 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } } - /** - * Display ReCAPTCHA warning on Contribution form - */ - protected function displayCaptchaWarning() { - if (CRM_Core_Permission::check("administer CiviCRM")) { - if (!CRM_Utils_ReCAPTCHA::hasSettingsAvailable()) { - $this->assign('displayCaptchaWarning', TRUE); - } - } - } - /** * Check if ReCAPTCHA has to be added on Contribution form forcefully. */ diff --git a/templates/CRM/Contribute/Form/Contribution/Main.tpl b/templates/CRM/Contribute/Form/Contribution/Main.tpl index 1a8d218053..fcbb26bfac 100644 --- a/templates/CRM/Contribute/Form/Contribution/Main.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Main.tpl @@ -50,12 +50,6 @@ {include file="CRM/Contribute/Form/Contribution/PreviewHeader.tpl"} {/if} - {if $displayCaptchaWarning} -
- {ts}To display reCAPTCHA on form you must get an API key from
https://www.google.com/recaptcha/admin/create{/ts} -
- {/if} - {if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') } {capture assign="buttonTitle"}{ts}Configure Contribution Page{/ts}{/capture} {crmButton target="_blank" p="civicrm/admin/contribute/settings" q="reset=1&action=update&id=`$contributionPageID`" fb=1 title="$buttonTitle" icon="fa-wrench"}{ts}Configure{/ts}{/crmButton} -- 2.25.1