diff --git a/front/reservationitem.php b/front/reservationitem.php index 57cee953f..8c99d61a8 100644 --- a/front/reservationitem.php +++ b/front/reservationitem.php @@ -44,6 +44,11 @@ $res = new ReservationItem(); $res->display($_GET); +if (isset($_GET['reset'])) { + unset($_SESSION['plugin_formcreator']['redirected']); +} +$_POST = $_SESSION['plugin_formcreator']['redirected']['POST'] ?? []; +unset($_SESSION['plugin_formcreator']['redirected']); if (isset($_POST['submit'])) { $_SESSION['glpi_saved']['ReservationItem'] = $_POST; } else { diff --git a/inc/wizard.class.php b/inc/wizard.class.php index 040afc679..fa866ba05 100644 --- a/inc/wizard.class.php +++ b/inc/wizard.class.php @@ -110,7 +110,7 @@ public static function header($title) { if (Session::haveRight("reservation", ReservationItem::RESERVEANITEM)) { echo '
  • '; - echo ''; + echo ''; echo ''; echo ''.__('Book an asset', 'formcreator').''; echo '
  • '; diff --git a/setup.php b/setup.php index 9ce01b574..f29e41d83 100644 --- a/setup.php +++ b/setup.php @@ -204,6 +204,9 @@ function plugin_init_formcreator() { ]; foreach ($pages as $srcPage => $dstPage) { if (strpos($_SERVER['REQUEST_URI'], $srcPage) !== false && strpos($_SERVER['REQUEST_URI'], $dstPage) === false) { + if ($srcPage == 'front/reservationitem.php') { + $_SESSION['plugin_formcreator']['redirected']['POST'] = $_POST; + } Html::redirect($dstPage); break; }