(dev/core#1065) fix condition so that the contact field appears for standalone/tab...
authoryashodha <yashodha@cividesk.com>
Thu, 5 Sep 2019 13:11:22 +0000 (18:41 +0530)
committereileen <emcnaughton@wikimedia.org>
Sat, 7 Sep 2019 00:45:10 +0000 (12:45 +1200)
fix for create grant from tab

CRM/Grant/Form/Grant.php

index d03961fb02e19443f53861247a08c3bac066aef2..de05a0c7cb8d8da08e5c9aa4fdd33c2666a12a20 100644 (file)
@@ -142,6 +142,11 @@ class CRM_Grant_Form_Grant extends CRM_Core_Form {
         $defaults['amount_granted'] = CRM_Utils_Money::format($defaults['amount_granted'], NULL, '%a');
       }
     }
+    else {
+      if ($this->_contactID) {
+        $defaults['contact_id'] = $this->_contactID;
+      }
+    }
 
     return $defaults;
   }