From 500462607730683052c8c43bce4e68057d728e57 Mon Sep 17 00:00:00 2001 From: yashodha Date: Wed, 1 May 2013 00:09:09 +0530 Subject: [PATCH] CRM-12463 --- CRM/Contribute/Form/SoftCredit.php | 7 +++++-- templates/CRM/Contribute/Form/SoftCredit.tpl | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CRM/Contribute/Form/SoftCredit.php b/CRM/Contribute/Form/SoftCredit.php index dc4ffa7b58..01b3c6b811 100644 --- a/CRM/Contribute/Form/SoftCredit.php +++ b/CRM/Contribute/Form/SoftCredit.php @@ -47,10 +47,13 @@ class CRM_Contribute_Form_SoftCredit { * @return void */ static function buildQuickForm(&$form) { + $prefix = 'soft_credit_'; + $form->_softCredit['item_count'] = 10; for ($rowNumber = 1; $rowNumber <= $form->_softCredit['item_count']; $rowNumber++) { - CRM_Contact_Form_NewContact::buildQuickForm($form, $rowNumber, NULL, TRUE, 'soft_credit_'); + CRM_Contact_Form_NewContact::buildQuickForm($form, $rowNumber, NULL, FALSE, $prefix); + $form->add('text', "{$prefix}contact[{$rowNumber}][amount]"); } - + // If we have a contact for this contribution, pass cid= to the dataUrl to exclude current contact from autocomplete results if ($form->_contactID) { $dataUrl = CRM_Utils_System::url('civicrm/ajax/rest', diff --git a/templates/CRM/Contribute/Form/SoftCredit.tpl b/templates/CRM/Contribute/Form/SoftCredit.tpl index 27ba3801e1..42213b893e 100644 --- a/templates/CRM/Contribute/Form/SoftCredit.tpl +++ b/templates/CRM/Contribute/Form/SoftCredit.tpl @@ -24,7 +24,9 @@ +--------------------------------------------------------------------+ *} {* template for adding form elements for soft credit form*} - {$form.soft_credit_to.label} + + {include file="CRM/Contact/Form/NewContact.tpl"} +{* {$form.soft_credit_to.label} {$form.soft_credit_to.html} {help id="id-soft_credit"} {if $siteHasPCPs} @@ -32,7 +34,7 @@ {/if} - {if $siteHasPCPs}{* Credit contribution to PCP. *} + {if $siteHasPCPs} {$form.pcp_made_through.label} @@ -61,7 +63,7 @@ {/if} - +*} {literal}