{# One macro per form control, dispatched from `form.html`'s field loop. Split out once that loop's `{% if field.widget == ... %}` chain reached 449 lines and kept growing with every column type Phase 3 added -- a page-layout template and a control library are two different things to review, and mixing them meant every new widget's diff also touched the page around it. `Renderer` runs with `undefined=StrictUndefined` (see `ui/renderer.py`'s docstring: a security control, not a preference), and a macro does not inherit the caller's template context the way an included file would -- so every value a macro needs is a parameter, spelled out at the call site in `form.html`. A macro that quietly relied on some ambient `settings` or `_` would raise the moment it was called from anywhere that variable was not already in scope, which is exactly the failure mode `StrictUndefined` exists to surface early rather than let happen once, in production, on whichever field a project opens first. #} {% macro readonly_control(field) %}