From 1ca02e8be2e4a29972c71c10fa69f97f60341faa Mon Sep 17 00:00:00 2001 From: "Matthew Wire (MJW Consulting)" Date: Sun, 23 Jun 2019 13:11:45 +0100 Subject: [PATCH] Set title using standard form method and use for success message on contributionpage --- CRM/Contribute/Form/ContributionPage.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/ContributionPage.php b/CRM/Contribute/Form/ContributionPage.php index 0c3833443d0d..c965e60d1ca5 100644 --- a/CRM/Contribute/Form/ContributionPage.php +++ b/CRM/Contribute/Form/ContributionPage.php @@ -120,13 +120,13 @@ public function preProcess() { CRM_Contribute_Form_ContributionPage_TabHeader::build($this); if ($this->_action == CRM_Core_Action::UPDATE) { - CRM_Utils_System::setTitle(ts('Configure Page - %1', [1 => $title])); + $this->setTitle(ts('Configure Page - %1', [1 => $title])); } elseif ($this->_action == CRM_Core_Action::VIEW) { - CRM_Utils_System::setTitle(ts('Preview Page - %1', [1 => $title])); + $this->setTitle(ts('Preview Page - %1', [1 => $title])); } elseif ($this->_action == CRM_Core_Action::DELETE) { - CRM_Utils_System::setTitle(ts('Delete Page - %1', [1 => $title])); + $this->setTitle(ts('Delete Page - %1', [1 => $title])); } //cache values. @@ -420,7 +420,7 @@ public function endPostProcess() { CRM_Core_Session::setStatus(ts("'%1' information has been saved.", [1 => CRM_Utils_Array::value('title', CRM_Utils_Array::value($subPage, $this->get('tabHeader')), $className)] - ), ts('Saved'), 'success'); + ), $this->getTitle(), 'success'); $this->postProcessHook();