Revert "dev/core#553: Creating new event takes value from default value not from...
authorYashodha Chaku <yashodha@cividesk.com>
Wed, 24 Apr 2019 15:27:19 +0000 (20:57 +0530)
committerGitHub <noreply@github.com>
Wed, 24 Apr 2019 15:27:19 +0000 (20:57 +0530)
CRM/Event/Form/ManageEvent/EventInfo.php

index 2176bab216d7f9b2df035012a7f9fa77f13bcb78..31317c09aa8d0fff18bea5c9a54815b1f1b79ca2 100644 (file)
@@ -48,11 +48,10 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent {
     parent::preProcess();
     $this->assign('selectedChild', 'settings');
 
-    $entityID = $this->_id ?: $this->_templateId;
-    if ($entityID) {
-      $this->assign('entityID', $entityID);
+    if ($this->_id) {
+      $this->assign('entityID', $this->_id);
       $eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event',
-        $entityID,
+        $this->_id,
         'event_type_id'
       );
     }
@@ -128,6 +127,7 @@ class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent {
     if ($this->_eventType) {
       $this->assign('customDataSubType', $this->_eventType);
     }
+    $this->assign('entityId', $this->_id);
 
     $this->_first = TRUE;
     $this->applyFilter('__ALL__', 'trim');