Use tab title in feedback message
authorChristian Wach <needle@haystack.co.uk>
Thu, 15 Nov 2018 13:16:03 +0000 (13:16 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 15 Nov 2018 20:37:25 +0000 (07:37 +1100)
CRM/Contribute/Form/ContributionPage.php

index b03e72fdf7d9c092f853f4ab95fd6880e00ab3d7..65173bec6f19c04cf647601cd9b2d786163fbfec 100644 (file)
@@ -392,7 +392,6 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form {
         case 'Contribute':
           $attributes = $this->getVar('_attributes');
           $subPage = CRM_Utils_Request::retrieveComponent($attributes);
-          $subPageName = ucfirst($subPage);
           if ($subPage == 'friend') {
             $nextPage = 'custom';
           }
@@ -403,13 +402,11 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form {
 
         case 'MembershipBlock':
           $subPage = 'membership';
-          $subPageName = 'MembershipBlock';
           $nextPage = 'thankyou';
           break;
 
         default:
           $subPage = strtolower($className);
-          $subPageName = $className;
           $nextPage = strtolower($nextPage);
 
           if ($subPage == 'amount') {
@@ -422,7 +419,7 @@ class CRM_Contribute_Form_ContributionPage extends CRM_Core_Form {
       }
 
       CRM_Core_Session::setStatus(ts("'%1' information has been saved.",
-        array(1 => $subPageName)
+        array(1 => CRM_Utils_Array::value('title', CRM_Utils_Array::value($subPage, $this->get('tabHeader')), $className))
       ), ts('Saved'), 'success');
 
       $this->postProcessHook();