Phase 3a-ii: Parent waiver/release in registration flow #26

Closed
opened 2026-03-10 03:56:55 +00:00 by forgejo_admin · 0 comments

Lineage

plan-2026-03-08-tryout-prep → Phase 3a → Phase 3a-ii (parent waiver)

Repo

forgejo_admin/basketball-api

User Story

As a parent registering my child for tryouts,
I must read and accept a liability waiver before submitting the registration form,
So that Westside Kings & Queens has legal protection and I understand the risks and policies.

Context

Registration form exists and works (Phase 3a, PR #22). But there is no waiver/release — legally required before kids step on a basketball court. Coaches already have an identical pattern: contractor agreement text + checkbox + timestamp + IP + stored in DB (Phase 2, PR #9). We replicate this exact pattern for parents.

The waiver MUST be signed before registration submits. No waiver = no registration = no roster.

This is on the critical path for tonight's demo to Marcus. Email blast (Phase 3b) cannot go out until the registration flow includes the waiver — we can't send parents to a form that's missing legal protection.

File Targets

Files to modify:

  • src/basketball_api/models.py — add waiver_signed (bool), waiver_signed_at (DateTime), waiver_signed_ip (String(45)) to Parent model
  • alembic/versions/ — new migration 005 adding waiver columns to parents table
  • src/basketball_api/routes/register.py — add waiver text display + required checkbox to registration form (both token pre-fill and walk-up paths). Block form submission if waiver not accepted. Record timestamp + IP on POST.
  • tests/test_register.py — add tests for waiver requirement

Files NOT to touch:

  • src/basketball_api/routes/coach.py — coach contractor agreement is separate and complete
  • src/basketball_api/routes/admin.py — no admin changes needed

Acceptance Criteria

  • Registration form displays full waiver text before the submit button (both token pre-fill and walk-up form paths)
  • Required checkbox: "I have read and agree to the Waiver & Release above"
  • Submit button is disabled until checkbox is checked (client-side JS, same pattern as coach agreement)
  • POST /register rejects submission if waiver not accepted (server-side validation)
  • On successful submission: waiver_signed=True, waiver_signed_at=now(), waiver_signed_ip=request.client.host stored on Parent record
  • Confirmation page shows "Waiver signed" with timestamp
  • Waiver text uses Westside red/black branding (use existing brand.py)
  • Alembic migration 005 is safe on existing data (nullable columns, no data loss)
  • All existing registration tests still pass
  • New tests verify: waiver required, waiver recorded, rejection without waiver

Waiver Text

WESTSIDE KINGS & QUEENS — PARENT/GUARDIAN WAIVER & RELEASE

1. ASSUMPTION OF RISK
I acknowledge that basketball and related athletic activities involve inherent risks of physical injury, including but not limited to sprains, fractures, concussions, and other injuries. I voluntarily assume all risks associated with my child's participation in Westside Kings & Queens programs, including tryouts, practices, games, tournaments, and travel.

2. LIABILITY RELEASE
I, on behalf of myself and my child, release and hold harmless Westside Kings & Queens, its owners, coaches, staff, volunteers, and affiliated organizations from any and all claims, demands, or causes of action arising from my child's participation in program activities, except in cases of gross negligence or willful misconduct.

3. MEDICAL AUTHORIZATION
In the event of a medical emergency, I authorize Westside Kings & Queens coaching staff and representatives to seek and consent to emergency medical treatment for my child if I cannot be reached. I understand I am responsible for all medical expenses incurred.

4. PHOTO/VIDEO RELEASE
I grant Westside Kings & Queens permission to photograph and record my child during program activities and to use such images and recordings for social media, marketing, promotional materials, and program documentation.

5. CODE OF CONDUCT
I agree that my child will demonstrate good sportsmanship, respect coaches and officials, and attend scheduled practices and events regularly. I agree to conduct myself appropriately and respectfully at all program events. Westside Kings & Queens reserves the right to dismiss any participant or parent/guardian whose behavior is detrimental to the program.

6. DIGITAL ACCEPTANCE
By checking the box below and submitting this form, I acknowledge that my electronic acceptance constitutes a legally binding signature. My acceptance is recorded with a timestamp and my IP address. I confirm that I am the parent or legal guardian of the player being registered and that I have the authority to agree to these terms on their behalf.

Test Expectations

  • POST without waiver checkbox → rejected (400 or re-render with error)
  • POST with waiver checkbox → accepted, waiver fields populated on Parent
  • GET /register (walk-up) shows waiver text
  • GET /register?token=X (pre-fill) shows waiver text
  • Existing registration tests still pass (form submission tests need waiver=yes added)
  • Run command: pytest tests/test_register.py -v

Constraints

  • Follow the EXACT pattern from coach contractor agreement in routes/coach.py — checkbox with JS disable, server-side validation, timestamp + IP recording
  • Waiver text goes in the registration form HTML, NOT a separate page — single-page flow
  • Use brand.py for styling — Westside red/black, same .agreement CSS class as coach page
  • Migration must be safe on existing Parent rows (all new columns nullable)

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • project-westside-basketball
  • Phase 3a (PR #22) — registration form this modifies
  • Phase 2 (PR #9) — coach contractor agreement pattern to follow
  • Phase 3b (Issue #20) — email blast blocked until waiver is in the form
### Lineage `plan-2026-03-08-tryout-prep` → Phase 3a → Phase 3a-ii (parent waiver) ### Repo `forgejo_admin/basketball-api` ### User Story As a parent registering my child for tryouts, I must read and accept a liability waiver before submitting the registration form, So that Westside Kings & Queens has legal protection and I understand the risks and policies. ### Context Registration form exists and works (Phase 3a, PR #22). But there is no waiver/release — legally required before kids step on a basketball court. Coaches already have an identical pattern: contractor agreement text + checkbox + timestamp + IP + stored in DB (Phase 2, PR #9). We replicate this exact pattern for parents. The waiver MUST be signed before registration submits. No waiver = no registration = no roster. This is on the critical path for tonight's demo to Marcus. Email blast (Phase 3b) cannot go out until the registration flow includes the waiver — we can't send parents to a form that's missing legal protection. ### File Targets Files to modify: - `src/basketball_api/models.py` — add `waiver_signed` (bool), `waiver_signed_at` (DateTime), `waiver_signed_ip` (String(45)) to Parent model - `alembic/versions/` — new migration 005 adding waiver columns to parents table - `src/basketball_api/routes/register.py` — add waiver text display + required checkbox to registration form (both token pre-fill and walk-up paths). Block form submission if waiver not accepted. Record timestamp + IP on POST. - `tests/test_register.py` — add tests for waiver requirement Files NOT to touch: - `src/basketball_api/routes/coach.py` — coach contractor agreement is separate and complete - `src/basketball_api/routes/admin.py` — no admin changes needed ### Acceptance Criteria - [ ] Registration form displays full waiver text before the submit button (both token pre-fill and walk-up form paths) - [ ] Required checkbox: "I have read and agree to the Waiver & Release above" - [ ] Submit button is disabled until checkbox is checked (client-side JS, same pattern as coach agreement) - [ ] POST /register rejects submission if waiver not accepted (server-side validation) - [ ] On successful submission: `waiver_signed=True`, `waiver_signed_at=now()`, `waiver_signed_ip=request.client.host` stored on Parent record - [ ] Confirmation page shows "Waiver signed" with timestamp - [ ] Waiver text uses Westside red/black branding (use existing `brand.py`) - [ ] Alembic migration 005 is safe on existing data (nullable columns, no data loss) - [ ] All existing registration tests still pass - [ ] New tests verify: waiver required, waiver recorded, rejection without waiver ### Waiver Text ``` WESTSIDE KINGS & QUEENS — PARENT/GUARDIAN WAIVER & RELEASE 1. ASSUMPTION OF RISK I acknowledge that basketball and related athletic activities involve inherent risks of physical injury, including but not limited to sprains, fractures, concussions, and other injuries. I voluntarily assume all risks associated with my child's participation in Westside Kings & Queens programs, including tryouts, practices, games, tournaments, and travel. 2. LIABILITY RELEASE I, on behalf of myself and my child, release and hold harmless Westside Kings & Queens, its owners, coaches, staff, volunteers, and affiliated organizations from any and all claims, demands, or causes of action arising from my child's participation in program activities, except in cases of gross negligence or willful misconduct. 3. MEDICAL AUTHORIZATION In the event of a medical emergency, I authorize Westside Kings & Queens coaching staff and representatives to seek and consent to emergency medical treatment for my child if I cannot be reached. I understand I am responsible for all medical expenses incurred. 4. PHOTO/VIDEO RELEASE I grant Westside Kings & Queens permission to photograph and record my child during program activities and to use such images and recordings for social media, marketing, promotional materials, and program documentation. 5. CODE OF CONDUCT I agree that my child will demonstrate good sportsmanship, respect coaches and officials, and attend scheduled practices and events regularly. I agree to conduct myself appropriately and respectfully at all program events. Westside Kings & Queens reserves the right to dismiss any participant or parent/guardian whose behavior is detrimental to the program. 6. DIGITAL ACCEPTANCE By checking the box below and submitting this form, I acknowledge that my electronic acceptance constitutes a legally binding signature. My acceptance is recorded with a timestamp and my IP address. I confirm that I am the parent or legal guardian of the player being registered and that I have the authority to agree to these terms on their behalf. ``` ### Test Expectations - [ ] POST without waiver checkbox → rejected (400 or re-render with error) - [ ] POST with waiver checkbox → accepted, waiver fields populated on Parent - [ ] GET /register (walk-up) shows waiver text - [ ] GET /register?token=X (pre-fill) shows waiver text - [ ] Existing registration tests still pass (form submission tests need waiver=yes added) - Run command: `pytest tests/test_register.py -v` ### Constraints - Follow the EXACT pattern from coach contractor agreement in `routes/coach.py` — checkbox with JS disable, server-side validation, timestamp + IP recording - Waiver text goes in the registration form HTML, NOT a separate page — single-page flow - Use `brand.py` for styling — Westside red/black, same `.agreement` CSS class as coach page - Migration must be safe on existing Parent rows (all new columns nullable) ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `project-westside-basketball` - Phase 3a (PR #22) — registration form this modifies - Phase 2 (PR #9) — coach contractor agreement pattern to follow - Phase 3b (Issue #20) — email blast blocked until waiver is in the form
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/basketball-api#26
No description provided.