➕️ change json files to php files and add custom fields for projects
Changeing the file type is necessary to use the ts() function during custom field creation. Added new custom fields to map the donation form settings.
This commit is contained in:
parent
968bb9d831
commit
0d9b312a9b
12 changed files with 1262 additions and 606 deletions
|
@ -173,17 +173,17 @@ function twinglecampaign_postSave_campaign_callback (
|
|||
try {
|
||||
civicrm_api3('TwingleProject', 'sync', ['id' => $campaign_id]);
|
||||
CRM_Utils_System::setUFMessage('TwingleProject was saved.');
|
||||
} catch (CiviCRM_API3_Exception $e) {
|
||||
Civi::log()->error(
|
||||
'twinglecampaign_postSave_callback ' . $e->getMessage()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
civicrm_api3('TwingleCampaign', 'create', ['id' => $campaign_id]);
|
||||
CRM_Utils_System::setUFMessage('TwingleCampaign was saved.');
|
||||
} catch (CiviCRM_API3_Exception $e) {
|
||||
Civi::log()->error(
|
||||
|
||||
function _get_campaign_type_id_twingle_project() {
|
||||
return ExtensionCache::getInstance()
|
||||
->getCampaignIds()['campaign_types']['twingle_project']['id'];
|
||||
}
|
||||
|
||||
function _get_campaign_type_id_twingle_campaign() {
|
||||
return ExtensionCache::getInstance()
|
||||
->getCampaignIds()['campaign_types']['twingle_campaign']['id'];
|
||||
}
|
||||
|
||||
'twinglecampaign_postSave_callback ' . $e->getMessage()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue