Skip to content

Commit

Permalink
Show custom data on recurring contributions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Feb 20, 2018
1 parent 8d97475 commit 9596897
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CRM/Contribute/Page/ContributionRecur.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public function view() {
$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);
}

Expand Down
3 changes: 2 additions & 1 deletion CRM/Core/BAO/CustomGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ public static function formatGroupTree(&$groupTree, $groupCount = 1, &$form = NU
/**
* 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
Expand All @@ -1972,6 +1972,7 @@ public static function formatGroupTree(&$groupTree, $groupCount = 1, &$form = NU
* @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();
Expand Down
2 changes: 2 additions & 0 deletions templates/CRM/Contribute/Page/ContributionRecur.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
<td><a class="crm-hover-button" href='{crmURL p="civicrm/contact/view/membership" q="action=view&reset=1&cid=`$contactId`&id=`$recur.membership_id`&context=membership&selectedChild=member"}'>{$recur.membership_name}</a></td>
</tr>
{/if}
{include file="CRM/Custom/Page/CustomDataView.tpl"}

</table>
<div class="crm-submit-buttons"><a class="button cancel crm-form-submit" href="{crmURL p='civicrm/contact/view' q='action=browse&selectedChild=contribute'}">{ts}Done{/ts}</a></div>
</div>
Expand Down

0 comments on commit 9596897

Please sign in to comment.