* form fields based on their requirement
*/
public function setFields() {
+ // Remove print document activity type
+ $unwanted = CRM_Core_OptionGroup::values('activity_type', FALSE, FALSE, FALSE, "AND v.name = 'Print PDF Letter'");
+ $activityTypes = array_diff_key(CRM_Core_PseudoConstant::ActivityType(FALSE), $unwanted);
+
$this->_fields = array(
'subject' => array(
'type' => 'text',
'followup_activity_type_id' => array(
'type' => 'select',
'label' => ts('Followup Activity'),
- 'attributes' => array('' => '- ' . ts('select activity') . ' -') + CRM_Core_PseudoConstant::ActivityType(FALSE),
+ 'attributes' => array('' => '- ' . ts('select activity') . ' -') + $activityTypes,
'extra' => array('class' => 'crm-select2'),
),
// Add optional 'Subject' field for the Follow-up Activiity, CRM-4491
),
),
);
-
- if (($this->_context == 'standalone') &&
- ($printPDF = CRM_Utils_Array::key('Print PDF Letter', $this->_fields['followup_activity_type_id']['attributes']))
- ) {
- unset($this->_fields['followup_activity_type_id']['attributes'][$printPDF]);
- }
}
/**