<%= t("tournaments.hub.squadre_edit_hint") %>
<% if @writable %> <%= form_with url: public_tournament_participants_path(@tournament), method: :post, html: { class: "tournament-form" } do %>| <%= t("tournaments.hub.logo") %> | <%= t("tournaments.hub.participant_name") %> | <%= t("tournaments.hub.participant_group") %> | |
|---|---|---|---|
|
<% if @writable %>
<% end %>
|
<% if @writable %> <%= text_field_tag "tournament_participant[name]", participant.name, id: "participant_name_#{participant.id}", form: form_id, required: true, class: "tournament-squad-name" %> <% else %> <%= tournament_team_chip(participant) %> <% end %> | <% if @writable && @groups.any? %> <%= select_tag "tournament_participant[group_id]", options_for_select([[t("tournaments.hub.no_group"), ""]] + @groups.map { |g| [g.name, g.id] }, participant.group_id), id: "participant_group_#{participant.id}", form: form_id, class: "tournament-squad-group" %> <% else %> <%= participant.group&.name || "—" %> <% end %> | <% if @writable %> <%= submit_tag t("tournaments.hub.save_match"), form: form_id, class: "btn btn-secondary tournament-match-form__save" %> <%= button_to t("matches.index.delete"), public_tournament_participant_path(@tournament, participant), method: :delete, class: "btn btn-secondary tournament-match-form__save", form: { data: { turbo_confirm: participant.name } } %> <% end %> |