From 0faf81a7695eb051794d62eb13056285c4e6c07d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 29 Sep 2014 14:42:49 -0400 Subject: [PATCH] More related data to refresh on contact summary tab --- CRM/Contact/Form/Inline/ContactInfo.php | 4 +++- CRM/Contact/Form/Relationship.php | 3 ++- CRM/Pledge/Page/Tab.php | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Inline/ContactInfo.php b/CRM/Contact/Form/Inline/ContactInfo.php index 796aefed89..e906cd326a 100644 --- a/CRM/Contact/Form/Inline/ContactInfo.php +++ b/CRM/Contact/Form/Inline/ContactInfo.php @@ -81,9 +81,11 @@ class CRM_Contact_Form_Inline_ContactInfo extends CRM_Contact_Form_Inline { CRM_Contact_BAO_Contact::create($params); - // Saving current employer affects relationship tab + // Saving current employer affects relationship tab, and possibly related memberships and contributions $this->ajaxResponse['updateTabs'] = array( '#tab_rel' => CRM_Contact_BAO_Contact::getCountComponent('rel', $this->_contactId), + '#tab_contribute' => CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId), + '#tab_member' => CRM_Contact_BAO_Contact::getCountComponent('membership', $this->_contactId), ); $this->response(); diff --git a/CRM/Contact/Form/Relationship.php b/CRM/Contact/Form/Relationship.php index fa83d3b7db..396ff14bd3 100644 --- a/CRM/Contact/Form/Relationship.php +++ b/CRM/Contact/Form/Relationship.php @@ -520,9 +520,10 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form { CRM_Contact_BAO_Relationship::disableEnableRelationship($this->_relationshipId, $active); } } - // Refresh contact tabs with related data + // Refresh contact tabs which might have been affected $this->ajaxResponse['updateTabs'] = array( '#tab_member' => CRM_Contact_BAO_Contact::getCountComponent('membership', $this->_contactId), + '#tab_contribute' => CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId), ); } // Set current employee/employer relationship, CRM-3532 diff --git a/CRM/Pledge/Page/Tab.php b/CRM/Pledge/Page/Tab.php index 0aaa6291f5..bd5c6a4e38 100644 --- a/CRM/Pledge/Page/Tab.php +++ b/CRM/Pledge/Page/Tab.php @@ -58,6 +58,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page { $this->ajaxResponse['tabCount'] = CRM_Contact_BAO_Contact::getCountComponent('pledge', $this->_contactId); // Refresh other tabs with related data $this->ajaxResponse['updateTabs'] = array( + '#tab_contribute' => CRM_Contact_BAO_Contact::getCountComponent('contribution', $this->_contactId), '#tab_activity' => CRM_Contact_BAO_Contact::getCountComponent('activity', $this->_contactId), ); } -- 2.25.1