Files
MatchLiveTv/backend/app/views/public/teams/edit.html.erb
Emiliano Frascaro ad9d67ddb6 Completa multi-sport su web, API score_action e controlli Android board-aware.
Allinea i form società/squadra al catalogo sport, espone score_action per basket/timed e corregge bug namespace Sports e Result nel period engine; l'app nativa gestisce overlay e punteggio per board con wizard regole esteso.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-09 21:48:29 +02:00

38 lines
1.9 KiB
Plaintext

<% content_for :title, "Modifica squadra — #{@team.name}" %>
<% content_for :robots, "noindex, nofollow" %>
<div class="wrap" style="padding-top:20px;max-width:560px">
<h1><%= @team.name %></h1>
<p style="color:#888">Società: <%= 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]", "Nome squadra" %>
<%= text_field_tag "team[name]", @team.name, required: true %>
<%= label_tag "team[sport]", "Sport" %>
<%= select_tag "team[sport]", sport_catalog_options(@team.sport_key) %>
<%= label_tag "team[description]", "Descrizione squadra" %>
<%= text_area_tag "team[description]", @team.description, rows: 5, placeholder: "Presentazione della squadra, palmarès, obiettivi della stagione…" %>
<div class="branding-logo-block">
<%= label_tag "team[photo_file]", "Foto di squadra (gruppo o stemma)" %>
<% if @team.team_photo_url.present? %>
<div class="branding-logo-preview">
<%= image_tag @team.team_photo_url, alt: "Foto squadra", 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: "Branding squadra (override)" %>
<p class="branding-hint">
Colori società:
<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 "Salva squadra", class: "btn btn-primary" %>
<% end %>
</div>
<p><%= link_to "← Dettagli squadra", public_team_details_path(@team) %></p>
</div>