More related data to refresh on contact summary tab
authorColeman Watts <coleman@civicrm.org>
Mon, 29 Sep 2014 18:42:49 +0000 (14:42 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 29 Sep 2014 18:42:49 +0000 (14:42 -0400)
CRM/Contact/Form/Inline/ContactInfo.php
CRM/Contact/Form/Relationship.php
CRM/Pledge/Page/Tab.php

index 796aefed89b8e37e25580a12d2267629422743cf..e906cd326ad7018664e292b9c07a3d3e7a2c190e 100644 (file)
@@ -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();
index fa83d3b7db1ad29774adf87d06eddf3053d75b95..396ff14bd393e3c287652a90bfd6b9383246f19f 100644 (file)
@@ -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
index 0aaa6291f5afe696d1628c7b8ad8d85f0f564e81..bd5c6a4e38b529c07e043123cde2430197f89a68 100644 (file)
@@ -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),
       );
     }