Browse Source

fix room search form

main
ghost 12 months ago
parent
commit
10dae97b78
  1. 6
      src/Controller/RoomController.php
  2. 2
      templates/default/module/room.html.twig

6
src/Controller/RoomController.php

@ -19,12 +19,14 @@ class RoomController extends AbstractController @@ -19,12 +19,14 @@ class RoomController extends AbstractController
'GET'
]
)]
public function index(): Response
public function index(
?Request $request
): Response
{
return $this->redirectToRoute(
'room_namespace',
[
'namespace' => $this->getParameter('app.kevacoin.room.namespace.default')
'namespace' => $request->get('namespace') ? $request->get('namespace') : $this->getParameter('app.kevacoin.room.namespace.default')
]
);
}

2
templates/default/module/room.html.twig

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<form name="room" action="{{ path('room_namespace', { namespace : room.namespace }) }}" method="get">
<form name="room" action="{{ path('room_index') }}" method="get">
<input type="text" name="namespace" value="{{ room.namespace }}" placeholder="{{ 'join room by kevacoin namespace...' | trans }}" />
</form>
{% if list %}

Loading…
Cancel
Save