From: Coleman Watts Date: Mon, 29 Sep 2014 18:42:49 +0000 (-0400) Subject: More related data to refresh on contact summary tab X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0faf81a7695eb051794d62eb13056285c4e6c07d;p=civicrm-core.git More related data to refresh on contact summary tab --- 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), ); }