CRM-16955 move setting of contact_id to parent form
authoreileenmcnaugton <eileen@fuzion.co.nz>
Tue, 18 Aug 2015 00:42:17 +0000 (12:42 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Tue, 18 Aug 2015 00:42:17 +0000 (12:42 +1200)
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Member/Form/Membership.php

index d8a99b1925a3aa6b90d151c8c438d868bf28dab9..65ac8d5b2ee169039715a60f296d3a748257db2d 100644 (file)
@@ -211,7 +211,7 @@ class CRM_Contribute_Form_AbstractEditPayment extends CRM_Contact_Form_Task {
   public function preProcess() {
     $this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
     $this->assign('contactID', $this->_contactID);
-
+    CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $this->_contactID));
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
   }
 
index e3ff3923569153d1cacc50f05f77d3ff0e5bfc37..7a4d7c46ca8d655cc0fa3e0d5edc1996a9ed1424 100644 (file)
@@ -186,7 +186,6 @@ class CRM_Member_Form_Membership extends CRM_Member_Form {
         CRM_Core_Error::fatal(ts("This Membership is linked to a contribution. You must have 'delete in CiviContribute' permission in order to delete this record."));
       }
     }
-    CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $this->_contactID));
 
     if ($this->_action & CRM_Core_Action::ADD) {
       if (!CRM_Member_BAO_Membership::statusAvailabilty($this->_contactID)) {