add no-JS fallback for contact page order tracking form
Some checks failed
deploy / deploy (push) Has been cancelled
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:
@@ -167,7 +167,8 @@ defmodule BerrypodWeb.ShopComponents.Content do
|
||||
<p class="card-text card-text--spaced">
|
||||
No orders found for that address. Make sure you use the same email you checked out with.
|
||||
</p>
|
||||
<form phx-submit="lookup_orders" class="card-inline-form">
|
||||
<form action="/contact/lookup" method="post" phx-submit="lookup_orders" class="card-inline-form">
|
||||
<input type="hidden" name="_csrf_token" value={Phoenix.Controller.get_csrf_token()} />
|
||||
<.shop_input
|
||||
type="email"
|
||||
name="email"
|
||||
@@ -188,7 +189,8 @@ defmodule BerrypodWeb.ShopComponents.Content do
|
||||
<p class="card-text card-text--spaced">
|
||||
Enter the email address you used at checkout and we'll send you a link.
|
||||
</p>
|
||||
<form phx-submit="lookup_orders" class="card-inline-form">
|
||||
<form action="/contact/lookup" method="post" phx-submit="lookup_orders" class="card-inline-form">
|
||||
<input type="hidden" name="_csrf_token" value={Phoenix.Controller.get_csrf_token()} />
|
||||
<.shop_input
|
||||
type="email"
|
||||
name="email"
|
||||
|
||||
Reference in New Issue
Block a user