From: yashodha Date: Tue, 30 Apr 2013 18:39:09 +0000 (+0530) Subject: CRM-12463 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=500462607730683052c8c43bce4e68057d728e57;p=civicrm-core.git CRM-12463 --- 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}