️ 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:
Marc Michalsky forumZFD 2021-04-12 09:47:42 +02:00
parent 968bb9d831
commit 0d9b312a9b
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9
12 changed files with 1262 additions and 606 deletions

View file

@ -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()
);
}