Hot fix for template for staging
Starting to get the production environment together, so some hot fixes are needed to the index template that haven't been accouted for yet. This one was updating the index template to use the new render class when login fails
This commit is contained in:
parent
48e447beba
commit
5ad29f78f6
3 changed files with 5 additions and 10 deletions
|
@ -21,7 +21,7 @@ class Index extends AbstractController
|
||||||
public function enterTheDen(Request $request, Auth $auth, RequestStack $requestStack, Render $render): Response
|
public function enterTheDen(Request $request, Auth $auth, RequestStack $requestStack, Render $render): Response
|
||||||
{
|
{
|
||||||
if ($request->getMethod() == "GET") {
|
if ($request->getMethod() == "GET") {
|
||||||
return $render->page([], "This is the Den", "back/index.twig");
|
return $render->page([], "The Bad Space | Den", "back/index.twig");
|
||||||
} else {
|
} else {
|
||||||
//handles login
|
//handles login
|
||||||
$handle = $request->request->get("handle");
|
$handle = $request->request->get("handle");
|
||||||
|
@ -31,10 +31,7 @@ class Index extends AbstractController
|
||||||
header("Location:/den");
|
header("Location:/den");
|
||||||
return new Response("<html><body>LOGGED IN</body></html>");
|
return new Response("<html><body>LOGGED IN</body></html>");
|
||||||
} else {
|
} else {
|
||||||
return $this->render("back/index.twig", [
|
return $render->page(["notice" => $result["message"]], "The Bad Space | Den", "back/index.twig");
|
||||||
"title" => "Close the door behind you",
|
|
||||||
"notice" => $result["message"]
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,9 +50,7 @@ class Locations extends AbstractController
|
||||||
//$search = $connection->fetchAllAssociative("SELECT * FROM searchlocations('agenda')");
|
//$search = $connection->fetchAllAssociative("SELECT * FROM searchlocations('agenda')");
|
||||||
return $render->page(["list" => $list, "mode" => "index"], "Bad Space | Locations", "back/locations.twig");
|
return $render->page(["list" => $list, "mode" => "index"], "Bad Space | Locations", "back/locations.twig");
|
||||||
} else {
|
} else {
|
||||||
return $this->render("back/index.twig", [
|
return $render->page([], "The Bad Space | Den", "back/index.twig");
|
||||||
"title" => "Close the door behind you",
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<section role="den-login">
|
<section role="den-login">
|
||||||
<h1>This is the Den</h1><br/>
|
<h1>This is the Den</h1><br/>
|
||||||
{% if notice is defined %}
|
{% if options.notice is defined %}
|
||||||
<div role="system-notice">
|
<div role="system-notice">
|
||||||
{{ notice }}
|
{{ options.notice }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ include("forms/login-form.twig") }}
|
{{ include("forms/login-form.twig") }}
|
||||||
|
|
Loading…
Reference in a new issue