From 481c2919c58d56f0c9fd8399e65fa8d9cce0a118 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Tue, 31 Oct 2023 14:16:46 +1300 Subject: [PATCH] FIX ModelAdmin toast elements --- code/LeftAndMain.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 87c04f363..6fdf89c41 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -867,6 +867,9 @@ public function redirect($url, $code = 302) if ($this->getRequest()->getHeader('X-Pjax') && !$response->getHeader('X-Pjax')) { $response->addHeader('X-Pjax', $this->getRequest()->getHeader('X-Pjax')); } + if ($this->getRequest()->getHeader('X-Status') && !$response->getHeader('X-Status')) { + $response->addHeader('X-Status', $this->getRequest()->getHeader('X-Status')); + } $newResponse = new LeftAndMain_HTTPResponse( $response->getBody(), $response->getStatusCode(),