Skip to content

Commit

Permalink
FIX ModelAdmin toast elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Oct 31, 2023
1 parent eaca9e7 commit 741dcce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/LeftAndMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,6 @@ public function handleRequest(HTTPRequest $request)
$e->setResponse($errorResponse);
throw $e;
}

$title = $this->Title();
if (!$response->getHeader('X-Controller')) {
$response->addHeader('X-Controller', static::class);
Expand Down Expand Up @@ -867,6 +866,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(),
Expand Down

0 comments on commit 741dcce

Please sign in to comment.