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
symfony-version
Ro 2 years ago
parent 48e447beba
commit 5ad29f78f6

@ -21,7 +21,7 @@ class Index extends AbstractController
public function enterTheDen(Request $request, Auth $auth, RequestStack $requestStack, Render $render): Response
{
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 {
//handles login
$handle = $request->request->get("handle");
@ -31,10 +31,7 @@ class Index extends AbstractController
header("Location:/den");
return new Response("<html><body>LOGGED IN</body></html>");
} else {
return $this->render("back/index.twig", [
"title" => "Close the door behind you",
"notice" => $result["message"]
]);
return $render->page(["notice" => $result["message"]], "The Bad Space | Den", "back/index.twig");
}
}
}

@ -50,9 +50,7 @@ class Locations extends AbstractController
//$search = $connection->fetchAllAssociative("SELECT * FROM searchlocations('agenda')");
return $render->page(["list" => $list, "mode" => "index"], "Bad Space | Locations", "back/locations.twig");
} else {
return $this->render("back/index.twig", [
"title" => "Close the door behind you",
]);
return $render->page([], "The Bad Space | Den", "back/index.twig");
}
}

@ -17,9 +17,9 @@
{% else %}
<section role="den-login">
<h1>This is the Den</h1><br/>
{% if notice is defined %}
{% if options.notice is defined %}
<div role="system-notice">
{{ notice }}
{{ options.notice }}
</div>
{% endif %}
{{ include("forms/login-form.twig") }}

Loading…
Cancel
Save