diff --git a/CRM/EntityTemplates/Utils.php b/CRM/EntityTemplates/Utils.php index 8c1a4d1..9d27a1a 100644 --- a/CRM/EntityTemplates/Utils.php +++ b/CRM/EntityTemplates/Utils.php @@ -89,6 +89,9 @@ class CRM_EntityTemplates_Utils { * @param array $params */ public static function addTemplate($objectName, $params) { + if (empty($params['entity_template'])) { + $params = $_POST; + } if (CRM_Utils_Array::value('entity_template', $params) == $objectName) { $id = NULL; if (!empty($params['entity_template_id'])) {