add no-JS fallback for contact page order tracking form
Some checks failed
deploy / deploy (push) Has been cancelled

Both order tracking forms now have action="/contact/lookup" so they
POST to a new OrderLookupController.lookup action when JS is off.
The controller mirrors the LiveView handler: checks for paid orders,
sends the verification email, and redirects with a flash message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-24 23:10:15 +00:00
parent 6ee8a31716
commit 6289c678f7
4 changed files with 80 additions and 2 deletions

View File

@@ -90,6 +90,9 @@ defmodule BerrypodWeb.Router do
# Checkout (POST — creates Stripe session and redirects)
post "/checkout", CheckoutController, :create
# Order lookup (no-JS fallback for contact page form)
post "/contact/lookup", OrderLookupController, :lookup
# Cart form actions (no-JS fallbacks for LiveView cart events)
post "/cart/add", CartController, :add
post "/cart/remove", CartController, :remove