From f34b768893e97593f0bd669006fdbce3330cafb0 Mon Sep 17 00:00:00 2001 From: colemanw Date: Wed, 4 Oct 2023 18:30:40 -0400 Subject: [PATCH] ContactSummary - Update activity tab when adding contribution --- CRM/Contribute/Form/Contribution.php | 1 + templates/CRM/common/TabHeader.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 31b980012d..507d25d136 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1106,6 +1106,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP if (empty($this->_id) && !empty($contribution->id)) { $this->_id = $contribution->id; } + $this->ajaxResponse['updateTabs']['#tab_activity'] = TRUE; if (!empty($this->_id) && CRM_Core_Permission::access('CiviMember')) { $membershipPaymentCount = civicrm_api3('MembershipPayment', 'getCount', ['contribution_id' => $this->_id]); if ($membershipPaymentCount) { diff --git a/templates/CRM/common/TabHeader.js b/templates/CRM/common/TabHeader.js index a5f25b4b6e..5de7c9dfd1 100644 --- a/templates/CRM/common/TabHeader.js +++ b/templates/CRM/common/TabHeader.js @@ -123,6 +123,9 @@ * @param count {Number} */ CRM.tabHeader.updateCount = function(tab, count) { + if (typeof count === 'boolean') { + return; + } var oldClass = getCountClass(tab); if (oldClass) { $(tab).removeClass(oldClass); -- 2.25.1