From acbae686a37cee1880f8c38e843176a956296fc3 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 11 Jul 2023 23:34:04 -0400 Subject: [PATCH] fix checkboxes --- CRM/Contribute/Form/Contribution/Main.php | 5 +++-- CRM/PCP/BAO/PCP.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index b890f9f980..035d529df2 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -429,8 +429,9 @@ 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->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( );"] + $this->add('checkbox', 'pcp_display_in_roll', ts('Show my contribution in the public honor roll'), + ['onclick' => "showHideByValue('pcp_display_in_roll','','nameID|nickID|personalNoteID','block','radio',false); pcpAnonymous( );"], + FALSE ); $extraOption = ['onclick' => "return pcpAnonymous( );"]; $this->addRadio('pcp_is_anonymous', NULL, [ts('Include my name and message'), ts('List my contribution anonymously')], [], '   ', FALSE, [$extraOption, $extraOption]); diff --git a/CRM/PCP/BAO/PCP.php b/CRM/PCP/BAO/PCP.php index 978af1f738..294e8f2b22 100644 --- a/CRM/PCP/BAO/PCP.php +++ b/CRM/PCP/BAO/PCP.php @@ -470,8 +470,9 @@ WHERE pcp.id = %1 AND cc.contribution_status_id = %2 AND cc.is_test = 0"; // build honor roll fields for registration form if supporter has honor roll enabled for their PCP if ($pcpInfo['is_honor_roll']) { $page->assign('is_honor_roll', TRUE); - $page->add('checkbox', 'pcp_display_in_roll', ts('Show my support in the public honor roll'), NULL, NULL, - ['onclick' => "showHideByValue('pcp_display_in_roll','','nameID|nickID|personalNoteID','block','radio',false); pcpAnonymous( );"] + $page->add('checkbox', 'pcp_display_in_roll', ts('Show my support in the public honor roll'), + ['onclick' => "showHideByValue('pcp_display_in_roll','','nameID|nickID|personalNoteID','block','radio',false); pcpAnonymous( );"], + FALSE ); $extraOption = ['onclick' => "return pcpAnonymous( );"]; $page->addRadio('pcp_is_anonymous', '', [ts('Include my name and message'), ts('List my support anonymously')], [], '   ', FALSE, [$extraOption, $extraOption]); -- 2.25.1