-- CRM-12941 handled for the point " If the onPopupClose is unspecified or is "redire...
authorRavish Nair <ravish.nair@webaccess.co.in>
Wed, 3 Jul 2013 07:48:59 +0000 (13:18 +0530)
committerRavish Nair <ravish.nair@webaccess.co.in>
Wed, 3 Jul 2013 07:48:59 +0000 (13:18 +0530)
----------------------------------------
* CRM-12941: Redirect to proper contact tab after saving profile
  http://issues.civicrm.org/jira/browse/CRM-12941

CRM/Profile/Form/Edit.php

index 8f792c563a88e448c8a8251d6d9cb7907891fe21..a18db50c9eeacdeef43f650665309e4a1c5e551b 100644 (file)
@@ -214,9 +214,10 @@ SELECT module
 
         //passing the post url to template so the popup form does
         //proper redirection and proccess form errors if any
-        $popupRedirect = CRM_Utils_System::url('civicrm/profile/edit', $urlParams, FALSE, NULL, FALSE);
-
-        if ($this->_onPopupClose == 'redirectToTab') {
+        if (!isset($this->_onPopupClose) || $this->_onPopupClose == 'redirectToProfile') {
+          $popupRedirect = CRM_Utils_System::url('civicrm/profile/edit', $urlParams, FALSE, NULL, FALSE);
+        }
+        elseif ($this->_onPopupClose == 'redirectToTab') {
           $popupRedirect = CRM_Utils_System::url('civicrm/contact/view', 
             "reset=1&cid={$this->_id}&selectedChild=custom_{$this->_customGroupId}", FALSE, NULL, FALSE);
         }