From: Andrew Hunt Date: Tue, 20 Oct 2015 16:57:25 +0000 (-0400) Subject: CRM-17425 Batch PCP: cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=172544ed2fab1bb15775ebeb6dadea6f415a1aef;p=civicrm-core.git CRM-17425 Batch PCP: cleanup ---------------------------------------- * CRM-17425: Allow PCP selection in contribution batch entry https://issues.civicrm.org/jira/browse/CRM-17425 --- diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 6a09ed9d17..e498baf8a3 100755 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -306,8 +306,6 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $errors["soft_credit_amount[$key]"] = ts('Soft credit amount should not be greater than the total amount'); } - // TODO: validate for PCP - //membership type is required for membership batch entry if ($self->_batchInfo['type_id'] == $batchTypes['Membership']) { if (empty($value['membership_type'][1])) { diff --git a/templates/CRM/Batch/Form/Entry.js b/templates/CRM/Batch/Form/Entry.js index 50bcb09f75..23bf05aef9 100755 --- a/templates/CRM/Batch/Form/Entry.js +++ b/templates/CRM/Batch/Form/Entry.js @@ -31,6 +31,8 @@ CRM.$(function($) { $('#soft_credit_type_'+ rowNum).val($('#sct_default_id').val()); }); + // Could be replaced if there ever is a PCP API. + // See templates/CRM/Contribute/Form/PCP.js.tpl var pcpURL = CRM.url('civicrm/ajax/rest', 'className=CRM_Contact_Page_AJAX&fnName=getPCPList&json=1&context=contact&reset=1'); $('input[name^="pcp_made_through_id"]').each(function() { // Figure out the name of the corresponding pcp_made_through[X] field @@ -58,7 +60,7 @@ CRM.$(function($) { } $('[name="'+thisMadeThroughName+'"]').val(fieldNameVal.text); }); - }) + }); $('input[name^="pcp_display_in_roll"]').each(function() { showHidePCPRoll(this);