skipOnHold = $this->skipDeceased = FALSE; CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this); // store case id if present $this->_caseId = CRM_Utils_Request::retrieve('caseid', 'Positive', $this, FALSE); // retrieve contact ID if this is 'single' mode $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE); if ($cid) { // this is true in non-search context / single mode // in search context 'id' is the default profile id for search display // CRM-11227 $this->_activityId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE); } if ($cid) { CRM_Contact_Form_Task_PDFLetterCommon::preProcessSingle($this, $cid); $this->_single = TRUE; $this->_cid = $cid; } else { parent::preProcess(); } $this->assign('single', $this->_single); } function setDefaultValues() { $defaults = array(); if (isset($this->_activityId)) { $params = array('id' => $this->_activityId); CRM_Activity_BAO_Activity::retrieve($params, $defaults); $defaults['html_message'] = CRM_Utils_Array::value('details', $defaults); } $defaults = $defaults + CRM_Contact_Form_Task_PDFLetterCommon::setDefaultValues(); return $defaults; } /** * Build the form * * @access public * * @return void */ public function buildQuickForm() { //enable form element $this->assign('suppressForm', FALSE); CRM_Contact_Form_Task_PDFLetterCommon::buildQuickForm($this); } /** * process the form after the input has been submitted and validated * * @access public * * @return void */ public function postProcess() { CRM_Contact_Form_Task_PDFLetterCommon::postProcess($this); } }