From 8ecd322d9d197634d77b8f9775945ae2f061f97b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 8 May 2023 16:40:16 +1200 Subject: [PATCH] Notice fix on isHonor --- CRM/Contribute/Form/Contribution/Main.php | 1 - templates/CRM/Contribute/Form/Contribution/Main.tpl | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index 28d3b62023..5d5132686d 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -432,7 +432,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $prms = ['id' => $this->_pcpId]; CRM_Core_DAO::commonRetrieve('CRM_PCP_DAO_PCP', $prms, $pcpInfo); if ($pcpInfo['is_honor_roll']) { - $this->assign('isHonor', TRUE); $this->add('checkbox', 'pcp_display_in_roll', ts('Show my contribution in the public honor roll'), NULL, NULL, ['onclick' => "showHideByValue('pcp_display_in_roll','','nameID|nickID|personalNoteID','block','radio',false); pcpAnonymous( );"] ); diff --git a/templates/CRM/Contribute/Form/Contribution/Main.tpl b/templates/CRM/Contribute/Form/Contribution/Main.tpl index a7ee32e09e..4921d72625 100644 --- a/templates/CRM/Contribute/Form/Contribution/Main.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Main.tpl @@ -218,7 +218,7 @@ {include file="CRM/UF/Form/Block.tpl" fields=$customPre} - {if $isHonor} + {if array_key_exists('pcp_display_in_roll', $form)}
@@ -297,8 +297,8 @@ {/if}