From a4a361c9560b9dc5f17e64be1f9418298dcdee18 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Tue, 20 Oct 2015 10:58:33 -0400 Subject: [PATCH] CRM-17425 Move PCP fields to their own field ---------------------------------------- * CRM-17425: Allow PCP selection in contribution batch entry https://issues.civicrm.org/jira/browse/CRM-17425 --- CRM/Core/BAO/UFGroup.php | 2 ++ templates/CRM/Batch/Form/Entry.tpl | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Core/BAO/UFGroup.php b/CRM/Core/BAO/UFGroup.php index 4038529f76..a1aa0b5d45 100644 --- a/CRM/Core/BAO/UFGroup.php +++ b/CRM/Core/BAO/UFGroup.php @@ -2175,6 +2175,8 @@ AND ( entity_id IS NULL OR entity_id <= 0 ) $SCTDefaultValue = CRM_Core_OptionGroup::getValue('soft_credit_type', 'Gift', 'name'); } $form->addElement('hidden', 'sct_default_id', $SCTDefaultValue, array('id' => 'sct_default_id')); + } + elseif ($fieldName == 'contribution_soft_credit_pcp_id') { CRM_Contribute_Form_SoftCredit::addPCPFields($form, "[$rowNumber]"); } elseif ($fieldName == 'currency') { diff --git a/templates/CRM/Batch/Form/Entry.tpl b/templates/CRM/Batch/Form/Entry.tpl index 0b3dc5b3aa..d7585e8d8b 100755 --- a/templates/CRM/Batch/Form/Entry.tpl +++ b/templates/CRM/Batch/Form/Entry.tpl @@ -100,11 +100,12 @@ {elseif $n eq 'soft_credit_type'}
{$form.soft_credit_type.$rowNumber.html} - {$form.pcp_made_through_id.$rowNumber.label} {$form.pcp_made_through_id.$rowNumber.html}{$form.pcp_made_through.$rowNumber.html} - {$form.pcp_display_in_roll.$rowNumber.label} {$form.pcp_display_in_roll.$rowNumber.html} - {$form.pcp_roll_nickname.$rowNumber.label} {$form.pcp_roll_nickname.$rowNumber.html} - {$form.pcp_personal_note.$rowNumber.label} {$form.pcp_personal_note.$rowNumber.html}
+ {elseif $n eq 'contribution_soft_credit_pcp_id'} +
{$form.pcp_made_through_id.$rowNumber.html}{$form.pcp_made_through.$rowNumber.html}
+
{$form.pcp_display_in_roll.$rowNumber.label} {$form.pcp_display_in_roll.$rowNumber.html}
+
{$form.pcp_roll_nickname.$rowNumber.label} {$form.pcp_roll_nickname.$rowNumber.html}
+
{$form.pcp_personal_note.$rowNumber.label} {$form.pcp_personal_note.$rowNumber.html}
{elseif in_array( $fields.$n.html_type, array('Radio', 'CheckBox'))}
 {$form.field.$rowNumber.$n.html}
{elseif $n eq 'total_amount'} -- 2.25.1