Files
eminuxandCursor 5b723bf844 Aggiunge annunci in-app/sito, contatti e migliora UI copertina sul portale.
Include admin/API/banner nativi, form contatti e reset copertina standard con layout edit più ampio.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 15:30:49 +02:00

56 lines
3.0 KiB
ERB

<% content_for :title, t("team.edit.title", name: @team.name) %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap wrap--portal" style="padding-top:20px">
<h1><%= @team.name %></h1>
<p style="color:#888"><%= t("team.edit.club_label") %> <%= link_to @club.name, public_club_path(@club) %></p>
<div class="card">
<%= 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") %>
<div class="branding-logo-block">
<%= label_tag "team[photo_file]", t("team.edit.photo_label") %>
<% if @team.team_photo_url.present? %>
<div class="branding-logo-preview">
<%= image_tag @team.team_photo_url, alt: t("team.edit.photo_alt"), class: "team-profile-photo-preview", width: 200 %>
</div>
<% end %>
<%= file_field_tag "team[photo_file]", accept: "image/png,image/jpeg,image/webp", class: "branding-file-input" %>
</div>
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: t("team.edit.branding_legend") %>
<%= render "shared/cover_fields",
record: @team,
show_inherit_hint: true,
can_upload: @entitlements&.can_use_custom_cover? %>
<%= label_tag "team[slug]", t("team.edit.slug_label") %>
<p class="branding-hint" style="margin-top:0">
<%= raw t("team.edit.slug_hint_html", base_url: MatchLiveTv.app_public_url.chomp("/"), slug: "<span id=\"team-slug-preview\">#{@team.slug}</span>") %>
</p>
<%= 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 %>
<p class="branding-hint"><%= t("team.edit.roster_public_hint") %></p>
<p class="branding-hint">
<%= t("team.edit.club_colors_label") %>
<span class="color-swatch" style="background:<%= @club.effective_primary_color %>"></span>
<span class="color-swatch" style="background:<%= @club.effective_secondary_color %>"></span>
</p>
<%= submit_tag t("team.edit.submit"), class: "btn btn-primary" %>
<% end %>
</div>
<p><%= link_to t("team.back_to_details"), public_team_details_path(@team) %></p>
</div>