add no-JS fallback for provider forms
Progressive enhancement: provider form now works without JavaScript. Forms POST to ProvidersController (create/update), which handles validation and redirects with flash messages. With JS: LiveView phx-submit handles save, navigates with flash. Without JS: Form POSTs to controller, redirects with flash. Completes Task 3 of notification overhaul (admin forms migration). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,8 @@ defmodule BerrypodWeb.Router do
|
||||
post "/settings/from-address", SettingsController, :update_from_address
|
||||
post "/settings/stripe/signing-secret", SettingsController, :update_signing_secret
|
||||
post "/navigation", NavigationController, :save
|
||||
post "/providers", ProvidersController, :create
|
||||
post "/providers/:id", ProvidersController, :update
|
||||
|
||||
live_session :admin,
|
||||
layout: {BerrypodWeb.Layouts, :admin},
|
||||
|
||||
Reference in New Issue
Block a user