+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Contact_Form_Task_PDFLetterCommon {
/**
- * Build all the data structures needed to build the form
+ * Build all the data structures needed to build the form.
*
* @param CRM_Core_Form $form
*
}
/**
- * Build the form object
+ * Build the form object.
*
* @var CRM_Core_Form $form
*
$form->assign('useSelectedPageFormat', ts('Should the new template always use the selected Page Format?'));
$form->assign('totalSelectedContacts', count($form->_contactIds));
- CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
+ CRM_Mailing_BAO_Mailing::commonCompose($form);
$buttons = array();
if ($form->get('action') != CRM_Core_Action::VIEW) {
}
/**
- * Set default values
+ * Set default values.
*/
public static function setDefaultValues() {
$defaultFormat = CRM_Core_BAO_PdfFormat::getDefaultValues();
}
/**
- * Form rule
+ * Form rule.
*
* @param array $fields
* The input form values.
}
/**
- * Part of the post process which prepare and extract information from the template
+ * Part of the post process which prepare and extract information from the template.
*
*
* @param CRM_Core_Form $form
}
/**
- * Process the form after the input has been submitted and validated
+ * Process the form after the input has been submitted and validated.
*
*
* @param CRM_Core_Form $form
}
if ($form->_cid) {
$activity = CRM_Activity_BAO_Activity::create($activityParams);
+ if (!empty($form->_caseId)) {
+ $caseActivityParams = array('activity_id' => $activity->id, 'case_id' => $form->_caseId);
+ CRM_Case_BAO_Case::processCaseActivity($caseActivityParams);
+ }
}
else {
// create Print PDF activity for each selected contact. CRM-6886