mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Remove 400 status code on globals submission
PHRAS-535
This commit is contained in:
@@ -22,7 +22,6 @@ class SetupController extends Controller
|
|||||||
$manipulator = $this->app['registry.manipulator'];
|
$manipulator = $this->app['registry.manipulator'];
|
||||||
$form = $manipulator->createForm($this->app['conf']);
|
$form = $manipulator->createForm($this->app['conf']);
|
||||||
|
|
||||||
$status = 200;
|
|
||||||
if ('POST' === $request->getMethod()) {
|
if ('POST' === $request->getMethod()) {
|
||||||
$form->submit($request->request->all());
|
$form->submit($request->request->all());
|
||||||
if ($form->isValid()) {
|
if ($form->isValid()) {
|
||||||
@@ -31,11 +30,11 @@ class SetupController extends Controller
|
|||||||
return $this->app->redirectPath('setup_display_globals');
|
return $this->app->redirectPath('setup_display_globals');
|
||||||
}
|
}
|
||||||
|
|
||||||
$status = 400;
|
// Do not return a 400 status code as not very well handled in calling JS.
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->renderResponse('admin/setup.html.twig', [
|
return $this->renderResponse('admin/setup.html.twig', [
|
||||||
'form' => $form->createView(),
|
'form' => $form->createView(),
|
||||||
], $status);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user