Files
RosterChief/controlpanel/templates/controlpanel/club_form.html
Bernard Siebens 59d1fce674 Add Club.website; rebuild Colours per D9's exact markup; add a mobile app preview
- club.website (URLField, blank) editable from both the club's own Identity
  page and the platform control panel's club form.
- Colours card rebuilt from the design canvas's literal D9 markup rather
  than the prior in-between version: swatch + mono hex merged into one
  bordered row (the swatch input and hex text input are the same real form
  field, just laid out together), and a contrast-check row of two colour-
  filled boxes instead of a plain text list -- labelled dynamically
  ("Black"/"White" on primary/secondary) since a club can pick a colour
  light enough that black, not white, is the real computed text colour.
- Logo card restyled to D9's dashed drop-zone look.
- Live preview gains a mobile app mock (marked "Coming soon") alongside the
  existing sidebar mock, using the same primary/secondary colours, ahead of
  that surface actually being built.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
2026-08-20 09:13:03 +02:00

58 lines
2.4 KiB
HTML

{% extends "controlpanel/base.html" %}
{% load lucide ui %}
{% block panel_title %}{% if object %}Edit {{ object }}{% else %}New club{% endif %}{% endblock panel_title %}
{% block breadcrumb %}
<a class="hover:text-ink" href="{% url 'controlpanel:club_list' %}">clubs</a>
<span>/</span>
<span class="text-ink">{% if object %}{{ object.slug }}{% else %}new{% endif %}</span>
{% endblock breadcrumb %}
{% block panel %}
<div class="font-display text-2xl font-extrabold text-ink uppercase">{% if object %}Edit {{ object }}{% else %}New club{% endif %}</div>
<div class="card">
<div class="card-body">
<form method="post" enctype="multipart/form-data" class="flex flex-col gap-4">
{% csrf_token %}
{% for error in form.non_field_errors %}
<div class="alert alert-error">
<span>{{ error }}</span>
</div>
{% endfor %}
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
{% form_field form.name %}
{% form_field form.legal_name %}
{% form_field form.contact_email %}
{% form_field form.website %}
{% form_field form.slug %}
{% form_field form.sport_type %}
</div>
<div class="border-t border-rule"></div>
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
{% form_field form.logo %}
{% form_field form.primary_color %}
{% form_field form.secondary_color %}
</div>
<div class="border-t border-rule"></div>
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
{% form_field form.season_start %}
{% form_field form.season_duration_months %}
</div>
<div class="flex justify-start gap-2 pt-2">
<a class="btn btn-outline gap-2" href="{% if update_view %}{% url "controlpanel:club_detail" object.pk %}{% else %}{% url "controlpanel:club_list" %}{% endif %}">{% lucide "arrow-left" size=16 %} Cancel</a>
<button class="btn btn-primary gap-2" type="submit">{% lucide "save" size=16 %} Save</button>
</div>
</form>
</div>
</div>
{% endblock panel %}