From 900be7e11a7ca501b23cb0d9b384aa4e8f368b17 Mon Sep 17 00:00:00 2001 From: JonathanBtq <99287239+Jonathanbtq@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:00:33 +0200 Subject: [PATCH] NEW hook on expensereport added (#31380) * Update hook on expensereport * Update card.php --------- Co-authored-by: Laurent Destailleur --- htdocs/expensereport/card.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 84575129068..db64e5294e4 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1722,6 +1722,15 @@ if ($action == 'create') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id."&rowid=".GETPOSTINT('rowid'), $langs->trans("DeleteLine"), $langs->trans("ConfirmDeleteLine"), "confirm_delete_line", '', 'yes', 1); } + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm); + $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;