Skip to content

Commit

Permalink
Merge pull request #14063 from JMAConsulting/core-553
Browse files Browse the repository at this point in the history
dev/core#553: Creating new event takes value from default value not from saved template for custom fields
  • Loading branch information
yashodha authored Apr 24, 2019
2 parents 6eca48d + 83fd174 commit b5a59db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CRM/Event/Form/ManageEvent/EventInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ public function preProcess() {
parent::preProcess();
$this->assign('selectedChild', 'settings');

if ($this->_id) {
$this->assign('entityID', $this->_id);
$entityID = $this->_id ?: $this->_templateId;
if ($entityID) {
$this->assign('entityID', $entityID);
$eventType = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event',
$this->_id,
$entityID,
'event_type_id'
);
}
Expand Down Expand Up @@ -127,7 +128,6 @@ public function buildQuickForm() {
if ($this->_eventType) {
$this->assign('customDataSubType', $this->_eventType);
}
$this->assign('entityId', $this->_id);

$this->_first = TRUE;
$this->applyFilter('__ALL__', 'trim');
Expand Down

0 comments on commit b5a59db

Please sign in to comment.