Add Coach mode C4: create event, reusing the desktop's own EventForm
management.forms.EventForm already scopes its teams field to teams_managed_by(user, club) via EventAudienceFormMixin -- exactly the restriction a coach needs, so it's reused as-is rather than duplicated. Only a subset of the desktop form's fields is rendered (title, kind, teams, location, start, answers-close deadline); the rest stays unset, all of it optional on the model except max_referees, which is dropped from the form entirely so its own default (2) applies instead of demanding a value this screen has no field for. After a successful save, replicates management.views.EventCreateView's own notify_new_event.delay(...) call by hand, since this isn't a CreateView -- attendance sync itself is automatic via events/signals.py. "Repeat weekly" from the design mock isn't wired up this stage -- the recurring-series machinery is a separate form with its own fields; adding it is later work, not something to fake with an inert toggle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -3453,6 +3453,9 @@
|
||||
.-mt-4 {
|
||||
margin-top: calc(var(--spacing) * -4);
|
||||
}
|
||||
.-mt-5 {
|
||||
margin-top: calc(var(--spacing) * -5);
|
||||
}
|
||||
.mt-0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
@@ -3917,6 +3920,9 @@
|
||||
.h-11 {
|
||||
height: calc(var(--spacing) * 11);
|
||||
}
|
||||
.h-12 {
|
||||
height: calc(var(--spacing) * 12);
|
||||
}
|
||||
.h-14 {
|
||||
height: calc(var(--spacing) * 14);
|
||||
}
|
||||
@@ -5528,6 +5534,11 @@
|
||||
outline-style: none;
|
||||
}
|
||||
}
|
||||
.has-checked\:text-white {
|
||||
&:has(*:checked) {
|
||||
color: var(--color-white);
|
||||
}
|
||||
}
|
||||
.sm\:col-span-2 {
|
||||
@media (width >= 40rem) {
|
||||
grid-column: span 2 / span 2;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user