Fix row ID not being set in contribution/participant form
authorPatrick Figel <pfigel@greenpeace.org>
Wed, 15 May 2019 08:23:12 +0000 (10:23 +0200)
committerPatrick Figel <pfigel@greenpeace.org>
Thu, 13 Jun 2019 21:26:05 +0000 (23:26 +0200)
CRM/Contribute/Form/Contribution.php
CRM/Event/Form/Participant.php

index 6632df7404aaf07c92c5401cfc19cbdf90ecf4df..d7149e5d092e355715cf52a687c393493732241b 100644 (file)
@@ -824,6 +824,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
 
     // if contribution is related to membership or participant freeze Financial Type, Amount
     if ($this->_id) {
+      $this->add('hidden', 'id', $this->_id);
       $componentDetails = CRM_Contribute_BAO_Contribution::getComponentDetails($this->_id);
       $isCancelledStatus = ($this->_values['contribution_status_id'] == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Cancelled'));
 
index f86fca2c27772a3921269e5426ee0fec0d792294..a1b1c61c17b0f7ab9dc9fc50f89d976fc513723b 100644 (file)
@@ -689,6 +689,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment
 
     if ($this->_id) {
       $this->assign('entityID', $this->_id);
+      $this->add('hidden', 'id', $this->_id);
     }
 
     $this->addSelect('role_id', ['multiple' => TRUE, 'class' => 'huge'], TRUE);