dev/user-interface#13 fix regression where option to email is not longer displayed.
authoreileen <emcnaughton@wikimedia.org>
Tue, 14 Jan 2020 20:57:49 +0000 (09:57 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 14 Jan 2020 20:59:33 +0000 (09:59 +1300)
The api parameter here was removed, seemingly unintentionally. It is picked up on by the script when it checks for email so
needs re-instating

CRM/Contribute/Form/Contribution.php

index 49e580d30fcd1c4c3689d42848e8ad1f8c20f9ef..04fa3e074a952d11d1be0cb61c9e7a46c27e3688 100644 (file)
@@ -607,8 +607,8 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     $this->assign('customDataSubType', $this->_contributionType);
     $this->assign('entityID', $this->_id);
 
-    $contactField = $this->addEntityRef('contact_id', ts('Contributor'), ['create' => TRUE], TRUE);
-    if ($this->_context != 'standalone') {
+    $contactField = $this->addEntityRef('contact_id', ts('Contributor'), ['create' => TRUE, 'api' => ['extra' => ['email']]], TRUE);
+    if ($this->_context !== 'standalone') {
       $contactField->freeze();
     }