Skip to content

Commit 741dcce

Browse files
author
Sabina Talipova
committed
FIX ModelAdmin toast elements
1 parent eaca9e7 commit 741dcce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code/LeftAndMain.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ public function handleRequest(HTTPRequest $request)
830830
$e->setResponse($errorResponse);
831831
throw $e;
832832
}
833-
834833
$title = $this->Title();
835834
if (!$response->getHeader('X-Controller')) {
836835
$response->addHeader('X-Controller', static::class);
@@ -867,6 +866,9 @@ public function redirect($url, $code = 302)
867866
if ($this->getRequest()->getHeader('X-Pjax') && !$response->getHeader('X-Pjax')) {
868867
$response->addHeader('X-Pjax', $this->getRequest()->getHeader('X-Pjax'));
869868
}
869+
if ($this->getRequest()->getHeader('X-Status') && !$response->getHeader('X-Status')) {
870+
$response->addHeader('X-Status', $this->getRequest()->getHeader('X-Status'));
871+
}
870872
$newResponse = new LeftAndMain_HTTPResponse(
871873
$response->getBody(),
872874
$response->getStatusCode(),

0 commit comments

Comments
 (0)