X-Powered-By: PHP/5.3.27
authorSarah Gladstone <sepg@pogstone.com>
Mon, 28 Apr 2014 22:49:46 +0000 (18:49 -0400)
committerSarah Gladstone <sepg@pogstone.com>
Mon, 28 Apr 2014 22:49:46 +0000 (18:49 -0400)
Content-type: text/html

CRM/Case/Form/CaseView.php

index c1cb71fcc39d1d1cf9ce2d5477b2d31959c8ad5c..700873f60a5f2cf73b38e233f6dc05d5eb196526 100644 (file)
@@ -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