Skip to content

Commit

Permalink
Merge pull request #14615 from mattwire/contributionpage_title
Browse files Browse the repository at this point in the history
Set title using standard form method and use for success message on contributionpage
  • Loading branch information
eileenmcnaughton authored Jul 9, 2019
2 parents 33c6a83 + 1ca02e8 commit abac0f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Contribute/Form/ContributionPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit abac0f7

Please sign in to comment.