fix room search form

This commit is contained in:
ghost 2023-12-06 04:09:43 +02:00
parent 660d6613d6
commit 10dae97b78
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -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 }}" /> <input type="text" name="namespace" value="{{ room.namespace }}" placeholder="{{ 'join room by kevacoin namespace...' | trans }}" />
</form> </form>
{% if list %} {% if list %}