From 2568b6c63bf2febdde23ba28b8dd8f8b6eb90fd8 Mon Sep 17 00:00:00 2001 From: William Mead Date: Fri, 6 Oct 2023 14:10:06 +0200 Subject: [PATCH] Fixed intervention done confirmation popup --- htdocs/fichinter/card.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 3a35601ea35..81c2ba403b4 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -592,15 +592,6 @@ if (empty($reshook)) { } else { $mesg = $object->error; } - } elseif ($action == 'classifydone' && $user->hasRight('ficheinter', 'creer')) { - // Classify Done - $result = $object->setStatut(Fichinter::STATUS_CLOSED); - if ($result > 0) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } else { - setEventMessages($object->error, $object->errors, 'errors'); - } } elseif ($action == 'confirm_reopen' && $user->hasRight('ficheinter', 'creer')) { // Reopen $result = $object->setStatut(Fichinter::STATUS_VALIDATED); @@ -1142,6 +1133,7 @@ if ($action == 'create') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateIntervention'), $text, 'confirm_validate', '', 1, 1); } + // Confirm done if ($action == 'classifydone') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloseIntervention'), $langs->trans('ConfirmCloseIntervention'), 'confirm_done', '', 0, 1); }