Commit d7e297be authored by Debarshi Bhaumik's avatar Debarshi Bhaumik

C51-384: Added case tokens on Email Modal

parent d5df9833
......@@ -164,6 +164,13 @@ class CRM_Contact_Form_Task_Email extends CRM_Contact_Form_Task {
*/
public function listTokens() {
$tokens = CRM_Core_SelectValues::contactTokens();
if (isset($this->_caseId) || isset($this->_caseIds)) {
// For a single case, list tokens relevant for only that case type
$caseTypeId = isset($this->_caseId) ? CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $this->_caseId, 'case_type_id') : NULL;
$tokens += CRM_Core_SelectValues::caseTokens($caseTypeId);
}
return $tokens;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment