CRM-12463
authoryashodha <yashodha.chaku@webaccess.co.in>
Mon, 6 May 2013 22:46:44 +0000 (04:16 +0530)
committeryashodha <yashodha.chaku@webaccess.co.in>
Mon, 6 May 2013 22:46:44 +0000 (04:16 +0530)
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/SoftCredit.php

index 0125faaacc6338e74574adf7c101d0116c9570ec..c88de3c73d0d3370ef80e498409eb44ebc39926d 100644 (file)
@@ -844,22 +844,6 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
     //CRM-7362 --add campaigns.
     CRM_Campaign_BAO_Campaign::addCampaign($this, CRM_Utils_Array::value('campaign_id', $this->_values));
 
-    // CRM-7368 allow user to set or edit PCP link for contributions
-    $siteHasPCPs = CRM_Contribute_PseudoConstant::pcPage();
-    if (!CRM_Utils_Array::crmIsEmptyArray($siteHasPCPs)) {
-      $this->assign('siteHasPCPs', 1);
-      $pcpDataUrl = CRM_Utils_System::url('civicrm/ajax/rest',
-        'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1',
-        FALSE, NULL, FALSE
-      );
-      $this->assign('pcpDataUrl', $pcpDataUrl);
-      $this->addElement('text', 'pcp_made_through', ts('Credit to a Personal Campaign Page'));
-      $this->addElement('hidden', 'pcp_made_through_id', '', array('id' => 'pcp_made_through_id'));
-      $this->addElement('checkbox', 'pcp_display_in_roll', ts('Display in Honor Roll?'), NULL);
-      $this->addElement('text', 'pcp_roll_nickname', ts('Name (for Honor Roll)'));
-      $this->addElement('textarea', 'pcp_personal_note', ts('Personal Note (for Honor Roll)'));
-    }
-
     CRM_Contribute_Form_SoftCredit::buildQuickForm($this);
 
     $js = NULL;
index 7b51243095c3d097419839205d4c5964fa144eb1..efa6b757306494f77773d227ba0ad12ef91349c9 100644 (file)
@@ -72,6 +72,21 @@ class CRM_Contribute_Form_SoftCredit {
       }
     }
 
+    // CRM-7368 allow user to set or edit PCP link for contributions
+    $siteHasPCPs = CRM_Contribute_PseudoConstant::pcPage();
+    if (!CRM_Utils_Array::crmIsEmptyArray($siteHasPCPs)) {
+      $form->assign('siteHasPCPs', 1);
+      $pcpDataUrl = CRM_Utils_System::url('civicrm/ajax/rest',
+        'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1',
+        FALSE, NULL, FALSE
+      );
+      $form->assign('pcpDataUrl', $pcpDataUrl);
+      $form->addElement('text', 'pcp_made_through', ts('Credit to a Personal Campaign Page'));
+      $form->addElement('hidden', 'pcp_made_through_id', '', array('id' => 'pcp_made_through_id'));
+      $form->addElement('checkbox', 'pcp_display_in_roll', ts('Display in Honor Roll?'), NULL);
+      $form->addElement('text', 'pcp_roll_nickname', ts('Name (for Honor Roll)'));
+      $form->addElement('textarea', 'pcp_personal_note', ts('Personal Note (for Honor Roll)'));
+    }
     $form->assign('showSoftCreditRow', $showSoftCreditRow);
     $form->assign('rowCount', $item_count);
     $form->assign('showCreateNew', $showCreateNew);