From: CiviCRM Date: Wed, 23 Jul 2014 04:37:50 +0000 (+0530) Subject: CRM-15002: fix case id in subject X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad32fddfc9454b07b7a9c6ea298f0d8139f9237a;p=civicrm-core.git CRM-15002: fix case id in subject --- diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index fe50098d8f..d73a75be5d 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -100,6 +100,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity { if ($this->_caseId) { $this->assign('caseId', $this->_caseId); $this->assign('countId', count($this->_caseId)); + $this->assign('caseID', CRM_Utils_Array::first($this->_caseId)); } if (!$this->_caseId || diff --git a/templates/CRM/Case/Form/Activity/LinkCases.tpl b/templates/CRM/Case/Form/Activity/LinkCases.tpl index 3e1b00f392..4d7217f735 100644 --- a/templates/CRM/Case/Form/Activity/LinkCases.tpl +++ b/templates/CRM/Case/Form/Activity/LinkCases.tpl @@ -54,7 +54,7 @@ if ($(this).val()) { var info = $(this).select2('data').extra; {/literal}{* Mix in variables and placeholders for clientside substitution *} - var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$client.sort_name 5=$caseTypeLabel 6=$caseId}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}"; + var subject = "{ts escape=js 1="%1" 2="%2" 3="%3" 4=$client.sort_name 5=$caseTypeLabel 6=$caseID}Create link between %1 - %2 (CaseID: %3) and %4 - %5 (CaseID: %6){/ts}"; {literal} $('#subject', $form).val(ts(subject, {1: info.sort_name, 2: info.case_type, 3: $(this).val()})); }