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:
jamey
2026-03-08 07:30:16 +00:00
parent 3e29a89fff
commit 0834437340
4 changed files with 70 additions and 3 deletions

View File

@@ -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},