From: colemanw Date: Wed, 4 Oct 2023 22:30:40 +0000 (-0400) Subject: ContactSummary - Update activity tab when adding contribution X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f34b768893e97593f0bd669006fdbce3330cafb0;p=civicrm-core.git ContactSummary - Update activity tab when adding contribution --- 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);