Skip to content

Commit

Permalink
Merge pull request #19625 from colemanw/fixTs
Browse files Browse the repository at this point in the history
Fix incorrect use of ts when setting custom data form title
  • Loading branch information
eileenmcnaughton authored Feb 19, 2021
2 parents 60c7b41 + ae74e1f commit 57ef507
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions CRM/Contact/Form/CustomData.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,19 @@ public function preProcess() {
$this->_copyValueId = CRM_Utils_Request::retrieve('copyValueId', 'Positive', $this);

$groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_groupID);
$mode = CRM_Utils_Request::retrieve('mode', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'GET');
$mode = ucfirst($mode);
CRM_Utils_System::setTitle(ts('%1 %2 Record', [1 => $mode, 2 => $groupTitle]));
switch ($mode) {
case 'add':
CRM_Utils_System::setTitle(ts('Add %1', [1 => $groupTitle]));
break;

case 'edit':
CRM_Utils_System::setTitle(ts('Edit %1', [1 => $groupTitle]));
break;

case 'copy':
CRM_Utils_System::setTitle(ts('Copy %1', [1 => $groupTitle]));
break;
}

if (!empty($_POST['hidden_custom'])) {
$this->assign('postedInfo', TRUE);
Expand Down

0 comments on commit 57ef507

Please sign in to comment.