FIX : event created from contract not linked to object origin

This commit is contained in:
atm-lena
2022-01-19 15:33:30 +01:00
parent 22a3b5ea78
commit c8589970af

View File

@@ -244,6 +244,8 @@ if ($id > 0) {
$newcardbutton = '';
if (!empty($conf->agenda->enabled)) {
if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) {
$backtopage = $_SERVER['PHP_SELF'].'?id='.$object->id;
$out = '&origin='.urlencode($object->element).'&originid='.$object->id.'&backtopage='.urlencode($backtopage);
$newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out);
}
}