{# The add and change form, in the same element the list renders into. It posts JSON to a route whose body is the view's generated model, so a rejected submit is FastAPI's own 422 and `js/errors.js` writes each message under the control whose `name` matches. Nothing here knows about errors. A successful save answers with the list and `HX-Push-Url`, so the region becomes the list and the address bar agrees. #} {% from "ui/button.html" import button %} {% from "ui/form.html" import form %} {% from "ui/layout.html" import page_header, row, stack %} {% from "admin/macros.html" import admin_field %}