<% content_for :title, t("team.edit.title", name: @team.name) %> <% content_for :robots, "noindex, nofollow" %>

<%= @team.name %>

<%= t("team.edit.club_label") %> <%= link_to @club.name, public_club_path(@club) %>

<%= form_with url: public_team_path(@team), method: :patch, multipart: true do %> <%= label_tag "team[name]", t("team.edit.name_label") %> <%= text_field_tag "team[name]", @team.name, required: true %> <%= label_tag "team[sport]", t("team.sport_label") %> <%= select_tag "team[sport]", sport_catalog_options(@team.sport_key) %> <%= label_tag "team[description]", t("team.edit.description_label") %> <%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: t("team.edit.description_placeholder") %>
<%= label_tag "team[photo_file]", t("team.edit.photo_label") %> <% if @team.team_photo_url.present? %>
<%= image_tag @team.team_photo_url, alt: t("team.edit.photo_alt"), class: "team-profile-photo-preview", width: 200 %>
<% end %> <%= file_field_tag "team[photo_file]", accept: "image/png,image/jpeg,image/webp", class: "branding-file-input" %>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: t("team.edit.branding_legend") %> <%= label_tag "team[slug]", t("team.edit.slug_label") %>

<%= raw t("team.edit.slug_hint_html", base_url: MatchLiveTv.app_public_url.chomp("/"), slug: "#{@team.slug}") %>

<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: t("team.edit.slug_title") %> <%= label_tag "team[roster_public]", class: "checkbox-label", style: "display:flex;align-items:center;gap:8px;margin-top:16px" do %> <%= hidden_field_tag "team[roster_public]", "0" %> <%= check_box_tag "team[roster_public]", "1", @team.roster_public?, id: "team_roster_public" %> <%= t("team.edit.roster_public_label") %> <% end %>

<%= t("team.edit.roster_public_hint") %>

<%= t("team.edit.club_colors_label") %>

<%= submit_tag t("team.edit.submit"), class: "btn btn-primary" %> <% end %>

<%= link_to t("team.back_to_details"), public_team_details_path(@team) %>