Skip to content
Snippets Groups Projects
Commit 0a982599 authored by ErikHommel's avatar ErikHommel
Browse files

locally tested multi-petition - issue 7746

parent 1d9b0764
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ class MultiPetition extends AbstractAction {
$specs->addSpecification(new Specification('petition_ids', 'Integer', E::ts('Petition(s)'), FALSE, NULL, NULL, [], TRUE));
$specs->addSpecification(new Specification('contact_id', 'Integer', E::ts('Contact ID'), TRUE, NULL));
$specs->addSpecification(new Specification('more_information', 'Integer', E::ts('More Information'), FALSE, 0));
return $specs;
}
......@@ -55,12 +56,13 @@ class MultiPetition extends AbstractAction {
$moreInformation = $parameterBag->getParameter('more_information');
foreach ($petitionIds as $petitionId) {
try {
civicrm_api3('FormProcessor', 'petition_form', [
$result = civicrm_api3('FormProcessor', 'petition_form', [
'petition_flag' => 1,
'campaign_id' => (int) $petitionId,
'contact_id' => $contactId,
'more_information' => $moreInformation,
]);
\Civi::log()->debug("Result is " . json_encode($result));
}
catch (\CiviCRM_API3_Exception $ex) {
\Civi::log()->error(E::ts("Could not process petition signature in ") . __METHOD__
......
......@@ -14,7 +14,7 @@
<url desc="Support">https://civicoop.org</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2021-09-16</releaseDate>
<releaseDate>2021-10-21</releaseDate>
<version>1.17</version>
<develStage>stable</develStage>
<compatibility>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment