CRM-17425 Move PCP fields to their own field
authorAndrew Hunt <andrew@aghstrategies.com>
Tue, 20 Oct 2015 14:58:33 +0000 (10:58 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Tue, 20 Oct 2015 16:46:26 +0000 (12:46 -0400)
----------------------------------------
* CRM-17425: Allow PCP selection in contribution batch entry
  https://issues.civicrm.org/jira/browse/CRM-17425

CRM/Core/BAO/UFGroup.php
templates/CRM/Batch/Form/Entry.tpl

index 4038529f76e15a03384892959a0b9d2ee597b698..a1aa0b5d458a3e67442a0e4983526dd35eb006f2 100644 (file)
@@ -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') {
index 0b3dc5b3aa455de82a37da4d8ca328303a315bd1..d7585e8d8b39b63d07874ae69159439f4aa0ad8f 100755 (executable)
           {elseif $n eq 'soft_credit_type'}
             <div class="compressed crm-grid-cell">
               {$form.soft_credit_type.$rowNumber.html}
-              {$form.pcp_made_through_id.$rowNumber.label}&nbsp;{$form.pcp_made_through_id.$rowNumber.html}{$form.pcp_made_through.$rowNumber.html}
-              {$form.pcp_display_in_roll.$rowNumber.label}&nbsp;{$form.pcp_display_in_roll.$rowNumber.html}
-              {$form.pcp_roll_nickname.$rowNumber.label}&nbsp;{$form.pcp_roll_nickname.$rowNumber.html}
-              {$form.pcp_personal_note.$rowNumber.label}&nbsp;{$form.pcp_personal_note.$rowNumber.html}
             </div>
+          {elseif $n eq 'contribution_soft_credit_pcp_id'}
+            <div>{$form.pcp_made_through_id.$rowNumber.html}{$form.pcp_made_through.$rowNumber.html}</div>
+            <div>{$form.pcp_display_in_roll.$rowNumber.label}&nbsp;{$form.pcp_display_in_roll.$rowNumber.html}</div>
+            <div>{$form.pcp_roll_nickname.$rowNumber.label}&nbsp;{$form.pcp_roll_nickname.$rowNumber.html}</div>
+            <div>{$form.pcp_personal_note.$rowNumber.label}&nbsp;{$form.pcp_personal_note.$rowNumber.html}</div>
           {elseif in_array( $fields.$n.html_type, array('Radio', 'CheckBox'))}
             <div class="compressed crm-grid-cell">&nbsp;{$form.field.$rowNumber.$n.html}</div>
           {elseif $n eq 'total_amount'}