mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW HOOK FORMCONFIRM IN TICKET (#31321)
This commit is contained in:
parent
9c0704ee56
commit
cf22007541
|
|
@ -764,6 +764,7 @@ if ($action == 'create' || $action == 'presend') {
|
|||
accessforbidden('', 0, 1);
|
||||
}
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
// Confirmation close
|
||||
if ($action == 'close') {
|
||||
|
|
@ -788,27 +789,39 @@ if ($action == 'create' || $action == 'presend') {
|
|||
),
|
||||
);
|
||||
|
||||
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_close", $formquestion, '', 1);
|
||||
$formconfirm = $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_close", $formquestion, '', 1);
|
||||
}
|
||||
// Confirmation abandon
|
||||
if ($action == 'abandon') {
|
||||
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("AbandonTicket"), $langs->trans("ConfirmAbandonTicket"), "confirm_abandon", '', '', 1);
|
||||
$formconfirm = $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("AbandonTicket"), $langs->trans("ConfirmAbandonTicket"), "confirm_abandon", '', '', 1);
|
||||
}
|
||||
// Confirmation delete
|
||||
if ($action == 'delete') {
|
||||
print $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("Delete"), $langs->trans("ConfirmDeleteTicket"), "confirm_delete_ticket", '', '', 1);
|
||||
$formconfirm = $form->formconfirm($url_page_current."?track_id=".$object->track_id, $langs->trans("Delete"), $langs->trans("ConfirmDeleteTicket"), "confirm_delete_ticket", '', '', 1);
|
||||
}
|
||||
// Confirm reopen
|
||||
if ($action == 'reopen') {
|
||||
print $form->formconfirm($url_page_current.'?track_id='.$object->track_id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenTicket'), 'confirm_reopen', '', '', 1);
|
||||
$formconfirm = $form->formconfirm($url_page_current.'?track_id='.$object->track_id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenTicket'), 'confirm_reopen', '', '', 1);
|
||||
}
|
||||
// Confirmation status change
|
||||
if ($action == 'set_status') {
|
||||
$new_status = GETPOST('new_status');
|
||||
//var_dump($url_page_current . "?track_id=" . $object->track_id);
|
||||
print $form->formconfirm($url_page_current."?track_id=".$object->track_id."&new_status=".GETPOST('new_status'), $langs->trans("TicketChangeStatus"), $langs->trans("TicketConfirmChangeStatus", $langs->transnoentities($object->labelStatusShort[$new_status])), "confirm_set_status", '', '', 1);
|
||||
$formconfirm = $form->formconfirm($url_page_current."?track_id=".$object->track_id."&new_status=".GETPOST('new_status'), $langs->trans("TicketChangeStatus"), $langs->trans("TicketConfirmChangeStatus", $langs->transnoentities($object->labelStatusShort[$new_status])), "confirm_set_status", '', '', 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;
|
||||
|
||||
// project info
|
||||
if ($projectid > 0) {
|
||||
$projectstat = new Project($db);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user