----------------------------------------
* CRM-17425: Allow PCP selection in contribution batch entry
https://issues.civicrm.org/jira/browse/CRM-17425
$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])) {
$('#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
}
$('[name="'+thisMadeThroughName+'"]').val(fieldNameVal.text);
});
- })
+ });
$('input[name^="pcp_display_in_roll"]').each(function() {
showHidePCPRoll(this);