From 24eba10342ddfd4b99e587a17b52f72ca4d28052 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Tue, 20 Feb 2018 17:30:09 +0000 Subject: [PATCH] CRM-21784 Show custom data on recurring contributions --- CRM/Contribute/Page/ContributionRecur.php | 3 +++ CRM/Core/BAO/CustomGroup.php | 3 ++- templates/CRM/Contribute/Page/ContributionRecur.tpl | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Page/ContributionRecur.php b/CRM/Contribute/Page/ContributionRecur.php index 01e40a7c71..a2c746a828 100644 --- a/CRM/Contribute/Page/ContributionRecur.php +++ b/CRM/Contribute/Page/ContributionRecur.php @@ -75,6 +75,9 @@ class CRM_Contribute_Page_ContributionRecur extends CRM_Core_Page { $contributionRecur['membership_name'] = $membershipDetails['membership_name']; } + $groupTree = CRM_Core_BAO_CustomGroup::getTree('ContributionRecur', NULL, $contributionRecur['id']); + CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree, FALSE, NULL, NULL, NULL, $contributionRecur['id']); + $this->assign('recur', $contributionRecur); } diff --git a/CRM/Core/BAO/CustomGroup.php b/CRM/Core/BAO/CustomGroup.php index 2e88e08014..1ec8b47144 100644 --- a/CRM/Core/BAO/CustomGroup.php +++ b/CRM/Core/BAO/CustomGroup.php @@ -1961,7 +1961,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1, /** * Build custom data view. * - * @param CRM_Core_Form $form + * @param CRM_Core_Form|CRM_Core_Page $form * Page object. * @param array $groupTree * @param bool $returnCount @@ -1972,6 +1972,7 @@ SELECT IF( EXISTS(SELECT name FROM civicrm_contact_type WHERE name like %1), 1, * @param int $entityId * * @return array|int + * @throws \Exception */ public static function buildCustomDataView(&$form, &$groupTree, $returnCount = FALSE, $gID = NULL, $prefix = NULL, $customValueId = NULL, $entityId = NULL) { $details = array(); diff --git a/templates/CRM/Contribute/Page/ContributionRecur.tpl b/templates/CRM/Contribute/Page/ContributionRecur.tpl index d825557da9..bce7514e2e 100644 --- a/templates/CRM/Contribute/Page/ContributionRecur.tpl +++ b/templates/CRM/Contribute/Page/ContributionRecur.tpl @@ -56,6 +56,8 @@ {$recur.membership_name} {/if} + {include file="CRM/Custom/Page/CustomDataView.tpl"} +
{ts}Done{/ts}
-- 2.25.1