change FT of contribution
This commit is contained in:
parent
bc00ef9c70
commit
e5acc93ccd
@ -236,6 +236,13 @@ function ftoverride_civicrm_buildForm($formName, &$form) {
|
||||
}
|
||||
}
|
||||
|
||||
if ('CRM_Contribute_Form_Contribution_Confirm' == $formName && $form->_flagSubmitted) {
|
||||
$submitValues = $form->_params;
|
||||
if (!empty($submitValues['designation'])) {
|
||||
//$form->assign('contribution_designation', $submitValues['designation']);
|
||||
}
|
||||
}
|
||||
|
||||
if ('CRM_Contribute_Form_Contribution_Main' == $formName) {
|
||||
try {
|
||||
$designations = ftoverride_get_designation($form->_id);
|
||||
@ -272,6 +279,14 @@ function ftoverride_civicrm_buildForm($formName, &$form) {
|
||||
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_buildForm
|
||||
*/
|
||||
function ftoverride_civicrm_pre($op, $objectName, $id, &$params) {
|
||||
if ($op == 'create' && $objectName == 'Contribution' && !empty($params['contribution_page_id'])) {
|
||||
$designation = CRM_Core_Smarty::singleton()->get_template_vars('contribution_designation');
|
||||
if (!empty($designation)) {
|
||||
$params['financial_type_id'] = $designation;
|
||||
CRM_Core_Smarty::singleton()->assign('contribution_designation', '');
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($op, ['create', 'edit'])
|
||||
&& $objectName == 'ContributionPage'
|
||||
&& isset($params['designation'])
|
||||
|
Loading…
Reference in New Issue
Block a user