Skip to content

Commit

Permalink
Merge pull request #21368 from mattwire/settitle
Browse files Browse the repository at this point in the history
Switch to CRM_Core_Form::setTitle() instead of CRM_Utils_System::setTitle() part 4
  • Loading branch information
eileenmcnaughton authored Sep 5, 2021
2 parents 41c0455 + 203b473 commit 15f57ff
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CRM/Member/Form/MembershipRenewal.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function preProcess() {
CRM_Custom_Form_CustomData::setDefaultValues($this);
}

CRM_Utils_System::setTitle(ts('Renew Membership'));
$this->setTitle(ts('Renew Membership'));

parent::preProcess();
}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/Form/MembershipView.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function preProcess() {
}

// omitting contactImage from title for now since the summary overlay css doesn't work outside crm-container
CRM_Utils_System::setTitle(ts('View Membership for') . ' ' . $displayName);
$this->setTitle(ts('View Membership for') . ' ' . $displayName);

// add viewed membership to recent items list
$recentTitle = $displayName . ' - ' . ts('Membership Type:') . ' ' . $values['membership_type'];
Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/Form/Task/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function buildQuickForm() {
CRM_Core_Error::statusBounce(ts('ufGroupId is missing'));
}
$this->_title = ts('Update multiple memberships') . ' - ' . CRM_Core_BAO_UFGroup::getTitle($ufGroupId);
CRM_Utils_System::setTitle($this->_title);
$this->setTitle($this->_title);

$this->addDefaultButtons(ts('Save'));
$this->_fields = [];
Expand Down
2 changes: 1 addition & 1 deletion CRM/Member/Form/Task/PickProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function preProcess() {
$session = CRM_Core_Session::singleton();
$this->_userContext = $session->readUserContext();

CRM_Utils_System::setTitle(ts('Update multiple memberships'));
$this->setTitle(ts('Update multiple memberships'));

$validate = FALSE;
//validations
Expand Down
2 changes: 1 addition & 1 deletion CRM/PCP/Form/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function preProcess() {
$title = ts('Edit Your Personal Campaign Page');
}

CRM_Utils_System::setTitle($title);
$this->setTitle($title);
parent::preProcess();
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/PCP/Form/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function setDefaultValues() {
$defaults = [];
if (isset($this->_id)) {
$title = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'title');
CRM_Utils_System::setTitle(ts('Personal Campaign Page Settings (%1)', [1 => $title]));
$this->setTitle(ts('Personal Campaign Page Settings (%1)', [1 => $title]));

$params = ['entity_id' => $this->_id, 'entity_table' => 'civicrm_event'];
CRM_Core_DAO::commonRetrieve('CRM_PCP_DAO_PCPBlock', $params, $defaults);
Expand Down
2 changes: 1 addition & 1 deletion CRM/PCP/Form/PCPAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function preProcess() {
$this->assign('pcpComponent', $this->_component);

if ($this->_single) {
CRM_Utils_System::setTitle(ts('Update Contact Information'));
$this->setTitle(ts('Update Contact Information'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/Pledge/Form/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function preProcess() {

$this->_id = CRM_Utils_Request::retrieve('ppId', 'Positive', $this);

CRM_Utils_System::setTitle(ts('Edit Scheduled Pledge Payment'));
$this->setTitle(ts('Edit Scheduled Pledge Payment'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion CRM/Pledge/Form/PledgeView.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function preProcess() {
$displayName .= ' (' . ts('default organization') . ')';
}
// omitting contactImage from title for now since the summary overlay css doesn't work outside of our crm-container
CRM_Utils_System::setTitle(ts('View Pledge by') . ' ' . $displayName);
$this->setTitle(ts('View Pledge by') . ' ' . $displayName);

// do check for campaigns
if ($campaignId = CRM_Utils_Array::value('campaign_id', $values)) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Price/Form/DeleteField.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function preProcess() {

$this->assign('title', $this->_title);

CRM_Utils_System::setTitle(ts('Confirm Price Field Delete'));
$this->setTitle(ts('Confirm Price Field Delete'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion CRM/Price/Form/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function preProcess() {
elseif ($this->_action & CRM_Core_Action::VIEW) {
$title = ts('Preview %1', [1 => $title]);
}
CRM_Utils_System::setTitle($title);
$this->setTitle($title);

$url = CRM_Utils_System::url('civicrm/admin/price', 'reset=1');
$breadCrumb = [
Expand Down
2 changes: 1 addition & 1 deletion CRM/Report/Form/Register.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function preProcess() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE);
$this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE);

CRM_Utils_System::setTitle(ts('Report Template'));
$this->setTitle(ts('Report Template'));

if ($this->_action & CRM_Core_Action::DELETE) {
return;
Expand Down
4 changes: 2 additions & 2 deletions CRM/UF/Form/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function preProcess() {

// setting title for html page
if ($this->_action & CRM_Core_Action::UPDATE) {
CRM_Utils_System::setTitle(ts('Profile Settings') . " - $title");
$this->setTitle(ts('Profile Settings') . " - $title");
}
elseif ($this->_action & (CRM_Core_Action::DISABLE | CRM_Core_Action::DELETE)) {
$ufGroup['module'] = implode(' , ', CRM_Core_BAO_UFGroup::getUFJoinRecord($this->_id, TRUE));
Expand All @@ -149,7 +149,7 @@ public function preProcess() {
$this->assign('message', $message);
}
else {
CRM_Utils_System::setTitle(ts('New CiviCRM Profile'));
$this->setTitle(ts('New CiviCRM Profile'));
}
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/Upgrade/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function source($fileName, $isQueryString = FALSE) {
}

public function preProcess() {
CRM_Utils_System::setTitle($this->getTitle());
$this->setTitle($this->getTitle());
if (!$this->verifyPreDBState($errorMessage)) {
if (!isset($errorMessage)) {
$errorMessage = 'pre-condition failed for current upgrade step';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(&$formValues) {
* @return void
*/
public function buildForm(&$form) {
CRM_Utils_System::setTitle(ts('My Search Title'));
$form->setTitle(ts('My Search Title'));

$form->add('text',
'household_name',
Expand Down

0 comments on commit 15f57ff

Please sign in to comment.