Some code cleanups
This commit is contained in:
@ -197,6 +197,14 @@ function ftoverride_civicrm_entityTypes(&$entityTypes) {
|
||||
*/
|
||||
function ftoverride_civicrm_buildForm($formName, &$form) {
|
||||
if ('CRM_Contribute_Form_ContributionPage_Settings' == $formName) {
|
||||
$showElement = TRUE;
|
||||
if ($form->getVar('_id')) {
|
||||
$snippet = CRM_Utils_Array::value('snippet', $_GET);
|
||||
if (empty($snippet)) {
|
||||
$showElement = FALSE;
|
||||
}
|
||||
}
|
||||
$form->assign('showElement', $showElement);
|
||||
$financialTypes = [];
|
||||
CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, $form->getVar('_action'));
|
||||
$form->add(
|
||||
@ -266,7 +274,7 @@ function ftoverride_civicrm_buildForm($formName, &$form) {
|
||||
function ftoverride_civicrm_pre($op, $objectName, $id, &$params) {
|
||||
if (in_array($op, ['create', 'edit'])
|
||||
&& $objectName == 'ContributionPage'
|
||||
&& !empty($params['designation'])
|
||||
&& isset($params['designation'])
|
||||
) {
|
||||
if ($id) {
|
||||
$params['id'] = $id;
|
||||
|
Reference in New Issue
Block a user