From: eileen Date: Mon, 3 May 2021 03:27:22 +0000 (+1200) Subject: Do not error on view contribution recur if not displaying contributions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d82f2a7c098dcfd114d99988e28bffad2e94141;p=civicrm-core.git Do not error on view contribution recur if not displaying contributions --- diff --git a/CRM/Contribute/Page/ContributionRecur.php b/CRM/Contribute/Page/ContributionRecur.php index ef68f424c7..07f5f0fd77 100644 --- a/CRM/Contribute/Page/ContributionRecur.php +++ b/CRM/Contribute/Page/ContributionRecur.php @@ -99,7 +99,7 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page { */ public function run() { $this->preProcess(); - + $this->assign('hasAccessCiviContributePermission', CRM_Core_Permission::check('access CiviContribute')); if ($this->isViewContext()) { $this->view(); } diff --git a/templates/CRM/Contribute/Page/ContributionRecur.tpl b/templates/CRM/Contribute/Page/ContributionRecur.tpl index 1c8b4dca28..a84499b3a7 100644 --- a/templates/CRM/Contribute/Page/ContributionRecur.tpl +++ b/templates/CRM/Contribute/Page/ContributionRecur.tpl @@ -53,28 +53,29 @@
{ts}Done{/ts}
{/if} - - +{if $hasAccessCiviContributePermission} + +{/if}