-
Notifications
You must be signed in to change notification settings - Fork 0
/
reoccuringdonationsdefault.php
74 lines (66 loc) · 2.06 KB
/
reoccuringdonationsdefault.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
require_once 'reoccuringdonationsdefault.civix.php';
/**
* [reoccuringdonationsdefault_civicrm_buildForm description]
*
*/
function reoccuringdonationsdefault_civicrm_buildForm($formName, &$form) {
if ($formName == "CRM_Contribute_Form_Contribution_Main") {
// id number of the contribution page to be defaulted to reoccuring
if ($form->_id == '8') {
if ($form->getAction() == CRM_Core_Action::ADD) {
$defaults['is_recur'] = '1';
$form->setDefaults($defaults);
}
}
}
}
/**
* Implements hook_civicrm_config().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
*/
function reoccuringdonationsdefault_civicrm_config(&$config) {
_reoccuringdonationsdefault_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_install
*/
function reoccuringdonationsdefault_civicrm_install() {
_reoccuringdonationsdefault_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
*/
function reoccuringdonationsdefault_civicrm_enable() {
_reoccuringdonationsdefault_civix_civicrm_enable();
}
/**
* Functions below this ship commented out. Uncomment as required.
*
/**
* Implements hook_civicrm_preProcess().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_preProcess
*
// */
/**
* Implements hook_civicrm_navigationMenu().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu
*
function reoccuringdonationsdefault_civicrm_navigationMenu(&$menu) {
_reoccuringdonationsdefault_civix_insert_navigation_menu($menu, NULL, array(
'label' => ts('The Page', array('domain' => 'com.aghstrategies.reoccuringdonationsdefault')),
'name' => 'the_page',
'url' => 'civicrm/the-page',
'permission' => 'access CiviReport,access CiviContribute',
'operator' => 'OR',
'separator' => 0,
));
_reoccuringdonationsdefault_civix_navigationMenu($menu);
} // */