Skip to content

Commit

Permalink
Update emailcollector_card.php
Browse files Browse the repository at this point in the history
support hook for add action
  • Loading branch information
oscim committed Feb 26, 2020
1 parent 4831d22 commit 2522d1e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions htdocs/admin/emailcollector_card.php
Expand Up @@ -573,6 +573,18 @@ function init_myfunc()
'recordevent'=>'RecordEvent');
if ($conf->projet->enabled) $arrayoftypes['project'] = 'CreateLeadAndThirdParty';
if ($conf->ticket->enabled) $arrayoftypes['ticket'] = 'CreateTicketAndThirdParty';

// support hook for add action
$parameters = array( 'arrayoftypes' => $arrayoftypes ) ;
$res = $hookmanager->executeHooks('addMoreActionsEmailCollector', $parameters, $object, $action);

if($res)
$arrayoftypes = $hookmanager->resArray;
else
foreach($hookmanager->resArray as $k=>$desc)
$arrayoftypes[$k]=$desc;


print $form->selectarray('operationtype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300');
print '</td><td>';
print '<input type="text" name="operationparam">';
Expand Down

0 comments on commit 2522d1e

Please sign in to comment.