Allow to specify template_id on URL when creating a new event
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 5 Sep 2018 22:44:26 +0000 (23:44 +0100)
committerMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 5 Sep 2018 22:44:26 +0000 (23:44 +0100)
CRM/Event/Form/ManageEvent/EventInfo.php

index b6ee9a770c90694197ff129fc0360afcd0c074b9..571071d39b0d50f7f4dc8e2f7c624fc9014fda7f 100644 (file)
@@ -117,6 +117,8 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent {
     if (!empty($defaults['end_date'])) {
       list($defaults['end_date'], $defaults['end_date_time']) = CRM_Utils_Date::setDateDefaults($defaults['end_date'], 'activityDateTime');
     }
+
+    $defaults['template_id'] = $this->_templateId;
     return $defaults;
   }