mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
21 lines
508 B
Elixir
21 lines
508 B
Elixir
<div class="form">
|
|
<h2><%= gettext "New game" %></h2>
|
|
|
|
<%= form_for @changeset, game_path(@conn, :create), [class: "create-game"],
|
|
fn form -> %>
|
|
<div class="form-group">
|
|
<%= live_render(
|
|
@conn,
|
|
ChessWeb.OpponentFinderLive,
|
|
session: %{"user_id" => current_user(@conn).id}
|
|
) %>
|
|
|
|
<%= error_tag form, :opponent_id %>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<%= submit gettext("Create game"), class: "button" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|