From: Matthew Wire Date: Mon, 26 Apr 2021 22:29:47 +0000 (+0100) Subject: Remove warning about reCaptcha missing key from contribution page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6a3bb72a250834c936490ee65e67a9428b04f260;p=civicrm-core.git Remove warning about reCaptcha missing key from contribution page --- 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}