Fix undefined tpl vars
authorColeman Watts <coleman@civicrm.org>
Mon, 21 Jun 2021 14:12:02 +0000 (10:12 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 21 Jun 2021 14:12:02 +0000 (10:12 -0400)
CRM/Event/Form/Participant.php

index ef6af29020825da4fa051c8108721bf1dafd3056..18fa581f869ed20147b5758c827aff216522e0ca 100644 (file)
@@ -327,8 +327,8 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
     $this->assign('participantMode', $this->_mode);
 
+    $this->assign('showFeeBlock', $this->_showFeeBlock);
     if ($this->_showFeeBlock) {
-      $this->assign('showFeeBlock', TRUE);
       $isMonetary = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_showFeeBlock, 'is_monetary');
       if ($isMonetary) {
         $this->assign('feeBlockPaid', TRUE);
@@ -358,10 +358,8 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
       return;
     }
 
-    if ($this->_id) {
-      // assign participant id to the template
-      $this->assign('participantId', $this->_id);
-    }
+    // assign participant id to the template
+    $this->assign('participantId', $this->_id);
 
     // when fee amount is included in form
     if (!empty($_POST['hidden_feeblock']) || !empty($_POST['send_receipt'])) {