NEW hook formConfirm on action comm card
This commit is contained in:
parent
bec9181d3f
commit
6aade2e506
@ -1903,13 +1903,22 @@ if ($id > 0) {
|
|||||||
} else {
|
} else {
|
||||||
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
|
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
|
||||||
|
|
||||||
|
$formconfirm = '';
|
||||||
|
|
||||||
// Clone event
|
// Clone event
|
||||||
if ($action == 'clone') {
|
if ($action == 'clone') {
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', array(), 'yes', 1);
|
||||||
|
|
||||||
print $formconfirm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call Hook formConfirm
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
|
||||||
|
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
|
||||||
|
|
||||||
|
// Print form confirm
|
||||||
|
print $formconfirm;
|
||||||
|
|
||||||
$linkback = '';
|
$linkback = '';
|
||||||
// Link to other agenda views
|
// Link to other agenda views
|
||||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user