Fixed code to support contribution search for soft credit filter

This commit is contained in:
2019-03-26 21:51:17 +00:00
parent a24c24e846
commit 37bc03a58f
3 changed files with 39 additions and 13 deletions

View File

@ -335,3 +335,21 @@ function softcreditcustomfields_civicrm_queryObjects(&$queryObjects, $type) {
$queryObjects[] = new CRM_SoftCredit_SoftCreditQueryObject();
}
}
/**
* Implements hook_civicrm_queryObjects().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_queryObjects
*/
function softcreditcustomfields_civicrm_alterContent(&$content, $context, $tplName, &$object) {
if (in_array($tplName, [
'CRM/Contribute/Form/Search/AdvancedSearchPane.tpl',
'CRM/Contribute/Form/Search.tpl'
])) {
$content = str_replace(
"cj('#contribution_soft_credit_type_id').val('');",
'',
$content
);
}
}