From fd54c68dec1ecaa386412b6b93d8402edab0ff76 Mon Sep 17 00:00:00 2001 From: Sarah Gladstone Date: Mon, 28 Apr 2014 18:49:46 -0400 Subject: [PATCH] X-Powered-By: PHP/5.3.27 Content-type: text/html --- CRM/Case/Form/CaseView.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CRM/Case/Form/CaseView.php b/CRM/Case/Form/CaseView.php index c1cb71fcc3..700873f60a 100644 --- a/CRM/Case/Form/CaseView.php +++ b/CRM/Case/Form/CaseView.php @@ -243,6 +243,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { $allActTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'name'); $emailActivityType = array_search('Email', $allActTypes); + $pdfActivityType = array_search('Print PDF Letter', $allActTypes); // remove Open Case activity type since we're inside an existing case if ($openActTypeId = array_search('Open Case', $allActTypes)) { @@ -266,7 +267,11 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { "action=add&context=standalone&reset=1&caseid={$this->_caseID}&atype=$type", FALSE, NULL, FALSE ); - } + }else if ($type == $pdfActivityType ) { + $url = CRM_Utils_System::url('civicrm/activity/pdf/add', + "action=add&context=standalone&reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&atype=$type", + FALSE, NULL, FALSE ); + } else { $url = CRM_Utils_System::url('civicrm/case/activity', "action=add&reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&atype=$type", @@ -534,5 +539,4 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form { $form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_'.$form->_caseID)); } } -} - +} \ No newline at end of file -- 2.25.1