Switch to CRM_Core_Form::setTitle() instead of CRM_Utils_System::setTitle() part 2
authorMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 20 Aug 2021 12:11:54 +0000 (13:11 +0100)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Thu, 2 Sep 2021 11:20:29 +0000 (12:20 +0100)
34 files changed:
CRM/Case/Form/ActivityToCase.php
CRM/Case/Form/ActivityView.php
CRM/Case/Form/Case.php
CRM/Case/Form/CaseView.php
CRM/Case/Form/CustomData.php
CRM/Contact/Form/Contact.php
CRM/Contact/Form/CustomData.php
CRM/Contact/Form/Domain.php
CRM/Contact/Form/Merge.php
CRM/Contact/Form/RelatedContact.php
CRM/Contact/Form/Relationship.php
CRM/Contact/Form/Search.php
CRM/Contact/Form/Task/AddToGroup.php
CRM/Contact/Form/Task/AddToParentClass.php
CRM/Contact/Form/Task/Batch.php
CRM/Contact/Form/Task/Delete.php
CRM/Contact/Form/Task/Email.php
CRM/Contact/Form/Task/Label.php
CRM/Contact/Form/Task/Map.php
CRM/Contact/Form/Task/PDFLetterCommon.php
CRM/Contact/Form/Task/PickProfile.php
CRM/Contact/Form/Task/RemoveFromGroup.php
CRM/Contact/Form/Task/Useradd.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Contribute/Form/CancelSubscription.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/Contribution/ThankYou.php
CRM/Contribute/Form/ContributionPage/Settings.php
CRM/Contribute/Form/ContributionView.php
CRM/Contribute/Form/Task/Batch.php
CRM/Contribute/Form/Task/Invoice.php
CRM/Contribute/Form/Task/PDF.php
CRM/Contribute/Form/Task/PickProfile.php
CRM/Contribute/Form/UpdateSubscription.php

index e591c8405afaa1643e9115c4d6e9120499013c79..95b2d6b7f77a0e389d51ccb4a0776a2803384d16 100644 (file)
@@ -37,11 +37,11 @@ class CRM_Case_Form_ActivityToCase extends CRM_Core_Form {
 
     switch (CRM_Utils_Request::retrieve('fileOnCaseAction', 'String')) {
       case 'move':
-        CRM_Utils_System::setTitle(ts('Move to Case'));
+        $this->setTitle(ts('Move to Case'));
         break;
 
       case 'copy':
-        CRM_Utils_System::setTitle(ts('Copy to Case'));
+        $this->setTitle(ts('Copy to Case'));
         break;
 
     }
index 6193357e089430f6b642415b72f7f8e01d836149..771d33d498bab4753d2f1e771d80908b69d48c59 100644 (file)
@@ -83,7 +83,7 @@ class CRM_Case_Form_ActivityView extends CRM_Core_Form {
     }
 
     if ($revs) {
-      CRM_Utils_System::setTitle(ts('Activity Revision History'));
+      $this->setTitle(ts('Activity Revision History'));
       $this->assign('revs', $revs);
       $this->assign('result', $viewPriorActivities);
       $this->assign('subject', $activitySubject);
index 5d83a0ab82de7e6215cfda35957ea67632428adb..b22d709192e2fdf46e8a0c72a7b8106207370e60 100644 (file)
@@ -164,7 +164,7 @@ class CRM_Case_Form_Case extends CRM_Core_Form {
 
     $details = CRM_Case_PseudoConstant::caseActivityType(FALSE);
 
-    CRM_Utils_System::setTitle($details[$this->_activityTypeId]['label']);
+    $this->setTitle($details[$this->_activityTypeId]['label']);
     $this->assign('activityType', $details[$this->_activityTypeId]['label']);
     $this->assign('activityTypeDescription', $details[$this->_activityTypeId]['description']);
 
index 910282887b1417ffc383c82e015589717766d6be..c1031b20f54518a589fd540f6bff596fc08c9ad2 100644 (file)
@@ -46,7 +46,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
       }
       $this->assign('relatedCases', $relatedCases);
       $this->assign('showRelatedCases', TRUE);
-      CRM_Utils_System::setTitle(ts('Related Cases'));
+      $this->setTitle(ts('Related Cases'));
       return;
     }
 
@@ -103,7 +103,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
     $displayName = CRM_Contact_BAO_Contact::displayName($this->_contactID);
     $this->assign('displayName', $displayName);
 
-    CRM_Utils_System::setTitle($displayName . ' - ' . $caseType);
+    $this->setTitle($displayName . ' - ' . $caseType);
 
     $recentOther = [];
     if (CRM_Core_Permission::checkActionPermission('CiviCase', CRM_Core_Action::DELETE)) {
index 76194afb051f10dd8312ec4ab79a0d208a45b9f1..95a339c2557f75c49c9463b4f6d081c443bb85ff 100644 (file)
@@ -60,7 +60,7 @@ class CRM_Case_Form_CustomData extends CRM_Core_Form {
     // Array contains only one item
     foreach ($groupTree as $groupValues) {
       $this->_customTitle = $groupValues['title'];
-      CRM_Utils_System::setTitle(ts('Edit %1', [1 => $groupValues['title']]));
+      $this->setTitle(ts('Edit %1', [1 => $groupValues['title']]));
     }
 
     $this->_defaults = [];
index ef35118d3f47559ae61d59ae4fe24b196e671059..2e6b51d888273b6a021231a0442212589a4076a6 100644 (file)
@@ -180,7 +180,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
       );
       $typeLabel = implode(' / ', $typeLabel);
 
-      CRM_Utils_System::setTitle(ts('New %1', [1 => $typeLabel]));
+      $this->setTitle(ts('New %1', [1 => $typeLabel]));
       $session->pushUserContext(CRM_Utils_System::url('civicrm/dashboard', 'reset=1'));
       $this->_contactId = NULL;
     }
@@ -221,7 +221,7 @@ class CRM_Contact_Form_Contact extends CRM_Core_Form {
         }
 
         // omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
-        CRM_Utils_System::setTitle($displayName);
+        $this->setTitle($displayName);
         $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this);
         $qfKey = CRM_Utils_Request::retrieve('key', 'String', $this);
 
index 05e3bd1ff11526df244838877c8102477369c9ea..a54431bea5daeadfe76de3821a41e0826c811eaa 100644 (file)
@@ -112,15 +112,15 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
         $groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_groupID);
         switch ($mode) {
           case 'add':
-            CRM_Utils_System::setTitle(ts('Add %1', [1 => $groupTitle]));
+            $this->setTitle(ts('Add %1', [1 => $groupTitle]));
             break;
 
           case 'edit':
-            CRM_Utils_System::setTitle(ts('Edit %1', [1 => $groupTitle]));
+            $this->setTitle(ts('Edit %1', [1 => $groupTitle]));
             break;
 
           case 'copy':
-            CRM_Utils_System::setTitle(ts('Copy %1', [1 => $groupTitle]));
+            $this->setTitle(ts('Copy %1', [1 => $groupTitle]));
             break;
         }
 
@@ -138,7 +138,7 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
     $this->assign('contact_type', $this->_contactType);
     $this->assign('contact_subtype', $this->_contactSubType);
     list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($this->_tableID);
-    CRM_Utils_System::setTitle($displayName, $contactImage . ' ' . $displayName);
+    $this->setTitle($displayName, $contactImage . ' ' . $displayName);
 
     // when custom data is included in this page
     if (!empty($_POST['hidden_custom'])) {
index 17b36a9229825292edeacd36b64c7b9cb3a91ad3..c9c31c51031a821092f07c4d1c90c0478a7843b7 100644 (file)
@@ -71,7 +71,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form {
   }
 
   public function preProcess() {
-    CRM_Utils_System::setTitle(ts('Organization Address and Contact Info'));
+    $this->setTitle(ts('Organization Address and Contact Info'));
     $breadCrumbPath = CRM_Utils_System::url('civicrm/admin', 'reset=1');
     CRM_Utils_System::appendBreadCrumb(ts('Administer CiviCRM'), $breadCrumbPath);
     $session = CRM_Core_Session::singleton();
index f7854fb154f73e626f8703bd8c6d2f9bb4e8a67e..a7394d6fdff9b07439c06ab71f60b019848b3356 100644 (file)
@@ -248,7 +248,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
   public function buildQuickForm() {
     $this->unsavedChangesWarn = FALSE;
-    CRM_Utils_System::setTitle(ts('Merge %1 contacts', [1 => $this->_contactType]));
+    $this->setTitle(ts('Merge %1 contacts', [1 => $this->_contactType]));
     $buttons = [];
 
     $buttons[] = [
index 3305b20c045ca1263bdc48756d6c520cec5cd233..68f64b70864c38ac4a4eb2f93a64419cdc5afe87 100644 (file)
@@ -74,7 +74,7 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
       }
 
       list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($this->_contactId);
-      CRM_Utils_System::setTitle($displayName, $contactImage . ' ' . $displayName);
+      $this->setTitle($displayName, $contactImage . ' ' . $displayName);
     }
     else {
       CRM_Core_Error::statusBounce(ts('Could not get a contact_id and/or contact_type'));
index 2be985d27a538b81718e4d55b35d9e46f04d52ff..6bbbdf3a91c8580521f03ab87659ae87cef8fa48 100644 (file)
@@ -139,19 +139,19 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
     // Set page title based on action
     switch ($this->_action) {
       case CRM_Core_Action::VIEW:
-        CRM_Utils_System::setTitle(ts('View Relationship for %1', [1 => $this->_display_name_a]));
+        $this->setTitle(ts('View Relationship for %1', [1 => $this->_display_name_a]));
         break;
 
       case CRM_Core_Action::ADD:
-        CRM_Utils_System::setTitle(ts('Add Relationship for %1', [1 => $this->_display_name_a]));
+        $this->setTitle(ts('Add Relationship for %1', [1 => $this->_display_name_a]));
         break;
 
       case CRM_Core_Action::UPDATE:
-        CRM_Utils_System::setTitle(ts('Edit Relationship for %1', [1 => $this->_display_name_a]));
+        $this->setTitle(ts('Edit Relationship for %1', [1 => $this->_display_name_a]));
         break;
 
       case CRM_Core_Action::DELETE:
-        CRM_Utils_System::setTitle(ts('Delete Relationship for %1', [1 => $this->_display_name_a]));
+        $this->setTitle(ts('Delete Relationship for %1', [1 => $this->_display_name_a]));
         break;
     }
 
index d41d16bb6cd8d47357c7d7fd338dab96058b8b51..1345c233094d99becf1c01bd21f1d09aeeaa603b 100644 (file)
@@ -436,7 +436,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
         }
 
         // Set dynamic page title for 'Show Members of Group'
-        CRM_Utils_System::setTitle(ts('Contacts in Group: %1', [1 => $this->_group[$this->_groupID]]));
+        $this->setTitle(ts('Contacts in Group: %1', [1 => $this->_group[$this->_groupID]]));
       }
 
       $group_contact_status = [];
@@ -464,7 +464,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search {
       }
 
       // Set dynamic page title for 'Add Members Group'
-      CRM_Utils_System::setTitle(ts('Add to Group: %1', [1 => $this->_group[$this->_amtgID]]));
+      $this->setTitle(ts('Add to Group: %1', [1 => $this->_group[$this->_amtgID]]));
       // also set the group title and freeze the action task with Add Members to Group
       $groupValues = ['id' => $this->_amtgID, 'title' => $this->_group[$this->_amtgID]];
       $this->assign_by_ref('group', $groupValues);
index b1964c7362bff639006e0a4d631500ebc3cad8bc..0abbad8b901bdb1ce5cb4f32803ef7d63b3244d9 100644 (file)
@@ -115,10 +115,10 @@ class CRM_Contact_Form_Task_AddToGroup extends CRM_Contact_Form_Task {
 
     // Set dynamic page title for 'Add Members Group (confirm)'
     if ($this->_id) {
-      CRM_Utils_System::setTitle(ts('Add Contacts: %1', [1 => $this->_title]));
+      $this->setTitle(ts('Add Contacts: %1', [1 => $this->_title]));
     }
     else {
-      CRM_Utils_System::setTitle(ts('Add Contacts to A Group'));
+      $this->setTitle(ts('Add Contacts to A Group'));
     }
 
     $this->addDefaultButtons(ts('Add to Group'));
index 42caaba86a218d888d0ff13c8d06ecf23a22be0c..194c22bd473b02a55bb44ca63a87d515cf4445d7 100644 (file)
@@ -30,7 +30,7 @@ class CRM_Contact_Form_Task_AddToParentClass extends CRM_Contact_Form_Task {
 
   public function buildQuickForm() {
     $contactType = $this->get('contactType');
-    CRM_Utils_System::setTitle(ts('Add Contacts to %1', [1 => $contactType]));
+    $this->setTitle(ts('Add Contacts to %1', [1 => $contactType]));
     $this->addElement('text', 'name', ts('Find Target %1', [1 => $contactType]));
 
     $this->add('select',
index c213001a72ee04b8e5b1762e0b708a19b022881a..f9effd484995524fba060aecede6925c87841617 100644 (file)
@@ -69,7 +69,7 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task {
       CRM_Core_Error::statusBounce(ts('ufGroupId is missing'));
     }
     $this->_title = ts('Update multiple contacts') . ' - ' . CRM_Core_BAO_UFGroup::getTitle($ufGroupId);
-    CRM_Utils_System::setTitle($this->_title);
+    $this->setTitle($this->_title);
 
     $this->addDefaultButtons(ts('Save'));
     $this->_fields = CRM_Core_BAO_UFGroup::getFields($ufGroupId, FALSE, CRM_Core_Action::VIEW);
index 9fac47037a1875e4fc6130234d28a5c4f4324a12..3f12db81402d50529eb12496bdc7cd12c73bcc40 100644 (file)
@@ -63,7 +63,7 @@ class CRM_Contact_Form_Task_Delete extends CRM_Contact_Form_Task {
     $this->assign('restore', $this->_restore);
 
     if ($this->_restore) {
-      CRM_Utils_System::setTitle(ts('Restore Contact'));
+      $this->setTitle(ts('Restore Contact'));
     }
 
     if ($cid) {
index 911a060adb0d7655a80dd022bf56ec703384d927..7524acca33430a8f597b321dc0a4a1f219891dde 100644 (file)
@@ -58,10 +58,10 @@ class CRM_Contact_Form_Task_Email extends CRM_Contact_Form_Task {
         $displayName[] = CRM_Contact_BAO_Contact::displayName($val);
       }
 
-      CRM_Utils_System::setTitle(implode(',', $displayName) . ' - ' . ts('Email'));
+      $this->setTitle(implode(',', $displayName) . ' - ' . ts('Email'));
     }
     else {
-      CRM_Utils_System::setTitle(ts('New Email'));
+      $this->setTitle(ts('New Email'));
     }
     if ($this->_context === 'search') {
       $this->_single = TRUE;
index 724b6ef786455a5962b1f77876effdb9e505e3ea..ac1effae177e360911fea0fc5ab9dc15fa21e3ac 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Contact_Form_Task_Label extends CRM_Contact_Form_Task {
    * @param CRM_Core_Form $form
    */
   public static function buildLabelForm($form) {
-    CRM_Utils_System::setTitle(ts('Make Mailing Labels'));
+    $form->setTitle(ts('Make Mailing Labels'));
 
     //add select for label
     $label = CRM_Core_BAO_LabelFormat::getList(TRUE);
index a6aaa273c9389f20ef565bdb201e289fb308e2a7..91991489e22bf0161b316990f7294acd1a182b62 100644 (file)
@@ -125,7 +125,7 @@ class CRM_Contact_Form_Task_Map extends CRM_Contact_Form_Task {
   public static function createMapXML($ids, $locationId, &$page, $addBreadCrumb, $type = 'Contact') {
     $config = CRM_Core_Config::singleton();
 
-    CRM_Utils_System::setTitle(ts('Map Location(s)'));
+    $this->setTitle(ts('Map Location(s)'));
     $page->assign('query', 'CiviCRM Search Query');
     $page->assign('mapProvider', $config->mapProvider);
     $page->assign('mapKey', urlencode($config->mapAPIKey));
index ce093ac680163ee0c4d79baa6a294455af5aff4b..bdfda53e402350b6cc001eee7b5d032211cbe72b 100644 (file)
@@ -68,7 +68,10 @@ class CRM_Contact_Form_Task_PDFLetterCommon extends CRM_Core_Form_Task_PDFLetter
     $form->_contactIds = explode(',', $cid);
     // put contact display name in title for single contact mode
     if (count($form->_contactIds) === 1) {
-      CRM_Utils_System::setTitle(ts('Print/Merge Document for %1', [1 => CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $cid, 'display_name')]));
+      $form->setTitle(
+        ts('Print/Merge Document for %1',
+        [1 => CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $cid, 'display_name')])
+      );
     }
   }
 
index 826e8ac9ac6907dbb1e16802c54c803ca1b1eb7b..d3d2430be322105215a6bfde5d3bfa454032d396 100644 (file)
@@ -80,7 +80,7 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task {
    * Build the form object.
    */
   public function buildQuickForm() {
-    CRM_Utils_System::setTitle(ts('Update multiple contacts'));
+    $this->setTitle(ts('Update multiple contacts'));
 
     foreach ($this->_contactIds as $id) {
       $this->_contactTypes = CRM_Contact_BAO_Contact::getContactTypes($id);
index a27a5441ea778f2b3c294b864ee0baf1bc05c70f..235f68f7a6a436235e13d4361e87e7d17080cbf2 100644 (file)
@@ -30,7 +30,7 @@ class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task {
     $group = ['' => ts('- select group -')] + CRM_Core_PseudoConstant::nestedGroup();
     $groupElement = $this->add('select', 'group_id', ts('Select Group'), $group, TRUE, ['class' => 'crm-select2 huge']);
 
-    CRM_Utils_System::setTitle(ts('Remove Contacts from Group'));
+    $this->setTitle(ts('Remove Contacts from Group'));
     $this->addDefaultButtons(ts('Remove from Group'));
   }
 
index 27a4ff7dd4a7aa0d7badcaffb87e0ef1cac85891..1956cd62729132a372f7fd50d3c1b2cc17ee50d5 100644 (file)
@@ -43,7 +43,7 @@ class CRM_Contact_Form_Task_Useradd extends CRM_Core_Form {
     $contact = CRM_Contact_BAO_Contact::retrieve($params, $defaults, $ids);
     $this->_displayName = $contact->display_name;
     $this->_email = $contact->email;
-    CRM_Utils_System::setTitle(ts('Create User Record for %1', [1 => $this->_displayName]));
+    $this->setTitle(ts('Create User Record for %1', [1 => $this->_displayName]));
   }
 
   /**
index 52bd3afaf8d0a769bd7414f811ad85c22e4f519a..eed602b3827f15c0996baaa46ab3d3770d19fdfd 100644 (file)
@@ -76,7 +76,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
 
     if ($this->_view == 'transaction' && ($this->_action & CRM_Core_Action::BROWSE)) {
       $title = $this->assignPaymentInfoBlock();
-      CRM_Utils_System::setTitle($title);
+      $this->setTitle($title);
       return;
     }
     if ($this->_component == 'event') {
index 22137d5d7934ee5dd44208411b8c799e246c0197..a5d1a36852eeca3e92bb2098dbc37a507ab37fb3 100644 (file)
@@ -97,7 +97,7 @@ class CRM_Contribute_Form_CancelSubscription extends CRM_Contribute_Form_Contrib
     // handle context redirection
     CRM_Contribute_BAO_ContributionRecur::setSubscriptionContext();
 
-    CRM_Utils_System::setTitle($this->_mid ? ts('Cancel Auto-renewal') : ts('Cancel Recurring Contribution'));
+    $this->setTitle($this->_mid ? ts('Cancel Auto-renewal') : ts('Cancel Recurring Contribution'));
     $this->assign('mode', $this->_mode);
 
     if ($this->isSelfService()) {
index 644f35a9b6ba142581344c08ff7d788c1c3fb65f..2d42f8f6543b6faa1130c8905345e0cede725b9a 100644 (file)
@@ -301,7 +301,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     if ($this->_mode && $this->_id) {
       $this->_payNow = TRUE;
       $this->assign('payNow', $this->_payNow);
-      CRM_Utils_System::setTitle(ts('Pay with Credit Card'));
+      $this->setTitle(ts('Pay with Credit Card'));
     }
     elseif (!empty($this->_values['is_template'])) {
       $this->setPageTitle(ts('Template Contribution'));
index 46e4ff43d8b1541686d8b0fbfda84edfa4b30d6e..623c9dd26eed4f32e27b0d2f1d7d4d0fdaf9a641 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
     $this->assign('thankyou_footer', CRM_Utils_Array::value('thankyou_footer', $this->_values));
     $this->assign('max_reminders', CRM_Utils_Array::value('max_reminders', $this->_values));
     $this->assign('initial_reminder_day', CRM_Utils_Array::value('initial_reminder_day', $this->_values));
-    CRM_Utils_System::setTitle(CRM_Utils_Array::value('thankyou_title', $this->_values));
+    $this->setTitle(CRM_Utils_Array::value('thankyou_title', $this->_values));
     // Make the contributionPageID available to the template
     $this->assign('contributionPageID', $this->_id);
     $this->assign('isShare', $this->_values['is_share']);
index aa03ed46eb2fc1704f0199bda604d18d2bfabbd0..f9adcb47c9bea3541cc7af6ccfad050d02d97e89 100644 (file)
@@ -41,7 +41,7 @@ class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_
         $this->_id,
         'title'
       );
-      CRM_Utils_System::setTitle(ts('Title and Settings') . " ($title)");
+      $this->setTitle(ts('Title and Settings') . " ($title)");
 
       foreach (['on_behalf', 'soft_credit'] as $module) {
         $ufJoinDAO = new CRM_Core_DAO_UFJoin();
index 02b3ce815faab9df87b90de5c7f5042889b6e91f..64f4c1473c856bbf15cfd6a444880aa60c43ebab 100644 (file)
@@ -172,10 +172,10 @@ class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
     }
 
     if (empty($values['is_template'])) {
-      CRM_Utils_System::setTitle(ts('View Contribution from') . ' ' . $displayName);
+      $this->setTitle(ts('View Contribution from') . ' ' . $displayName);
     }
     else {
-      CRM_Utils_System::setTitle(ts('View Template Contribution from') . ' ' . $displayName);
+      $this->setTitle(ts('View Template Contribution from') . ' ' . $displayName);
     }
 
     // add viewed contribution to recent items list
index 5cf089e51a51bf89efa9f90cc98d89ea39789732..5381f47c91242ca3903b163aa971d065d381965a 100644 (file)
@@ -72,7 +72,7 @@ class CRM_Contribute_Form_Task_Batch extends CRM_Contribute_Form_Task {
       throw new CRM_Core_Exception('ufGroupId is missing');
     }
     $this->_title = ts('Update multiple contributions') . ' - ' . CRM_Core_BAO_UFGroup::getTitle($ufGroupId);
-    CRM_Utils_System::setTitle($this->_title);
+    $this->setTitle($this->_title);
 
     $this->addDefaultButtons(ts('Save'));
     $this->_fields = [];
index 8d3b16769e465a0e6a4504edc071766e16199ab7..a3d5adab715bcdedd31924fc982f496e8f35e449 100644 (file)
@@ -123,10 +123,10 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
 
     CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
     if ($this->_selectedOutput == 'email') {
-      CRM_Utils_System::setTitle(ts('Email Invoice'));
+      $this->setTitle(ts('Email Invoice'));
     }
     else {
-      CRM_Utils_System::setTitle(ts('Print Contribution Invoice'));
+      $this->setTitle(ts('Print Contribution Invoice'));
     }
   }
 
index a34d5ded188a518276a7059cd49faf9e00209d76..39cfd686857736814cbf077cb7c2a420b0bd5d45 100644 (file)
@@ -65,7 +65,7 @@ AND    {$this->_componentClause}";
     // we have all the contribution ids, so now we get the contact ids
     parent::setContactIDs();
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
-    CRM_Utils_System::setTitle(ts('Print Contribution Receipts'));
+    $this->setTitle(ts('Print Contribution Receipts'));
     // Ajax submit would interfere with pdf file download
     $this->preventAjaxSubmit();
   }
index ea952ba5f591896579b1ecaec21bd3300b9626ef..ca4f3d8a8f5ba3565239f6c8099b6693b191bd5d 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Contribute_Form_Task_PickProfile extends CRM_Contribute_Form_Task {
     $session = CRM_Core_Session::singleton();
     $this->_userContext = $session->readUserContext();
 
-    CRM_Utils_System::setTitle(ts('Update multiple contributions'));
+    $this->setTitle(ts('Update multiple contributions'));
 
     $validate = FALSE;
     //validations
index 0fa06399001613f4de5064049338f03778230144..1766a613da16e339fc76e99ee0c6da03c200a578 100644 (file)
@@ -115,7 +115,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Contribute_Form_Contrib
       [$this->_donorDisplayName, $this->_donorEmail] = CRM_Contact_BAO_Contact::getContactDetails($this->_subscriptionDetails->contact_id);
     }
 
-    CRM_Utils_System::setTitle(ts('Update Recurring Contribution'));
+    $this->setTitle(ts('Update Recurring Contribution'));
 
     // Handle context redirection.
     CRM_Contribute_BAO_ContributionRecur::setSubscriptionContext();