Fix regression whereby making receive_date required breaks back office cc
authoreileen <emcnaughton@wikimedia.org>
Mon, 11 Feb 2019 20:16:22 +0000 (09:16 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 11 Feb 2019 20:44:54 +0000 (09:44 +1300)
Regression from https://lab.civicrm.org/dev/core/issues/680
led to https://civicrm.stackexchange.com/questions/28410/unable-to-take-credit-card-payment-after-civi-update

CRM/Contribute/Form/Contribution.php

index e9c86d36de57f88e404a23425492d70b7662d0a1..ef49a71c9ef9d1800095a1562ffa2cc539ae89f2 100644 (file)
@@ -699,7 +699,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     }
 
     // add various dates
-    $this->addField('receive_date', array('entity' => 'contribution'), TRUE, FALSE);
+    $this->addField('receive_date', array('entity' => 'contribution'), !$this->_mode, FALSE);
     $this->addField('receipt_date', array('entity' => 'contribution'), FALSE, FALSE);
     $this->addField('cancel_date', array('entity' => 'contribution', 'label' => ts('Cancelled / Refunded Date')), FALSE, FALSE);