{# The form macros: abilian-ds's signatures, abilian-ds's classes. These lived here emitting Bootstrap class names, and the lint gate could not see it because Tabler's stylesheet was in the gate's own vocabulary. Nothing rendered against that stylesheet any more; the macros had simply stopped being styled. There is no `is-invalid` class. The invalid state is keyed off `aria-invalid="true"` in form.css — the attribute the field must carry anyway — so a field cannot look wrong without also announcing that it is wrong, and the two cannot drift apart. These are for ordinary server-rendered Jinja. They cannot be used inside a situ component: situ compiles the component's .html at source level, so a binder a macro emits is never seen by the compiler. Macros render chrome; islands are hand-written. #} {%- macro _wiring(name, help, errors, required) -%} {%- set described = ([name ~ "-help"] if help else []) + ([name ~ "-error"] if errors else []) -%} {%- if described %} aria-describedby="{{ described | join(" ") }}"{% endif -%} {%- if errors %} aria-invalid="true"{% endif -%} {%- if required %} required{% endif -%} {%- endmacro -%} {%- macro _messages(name, help, errors) -%} {%- if help %}{{ help }}{% endif -%} {%- if errors %}{{ errors | join(", ") }}{% endif -%} {%- endmacro -%} {%- macro _wrapper(name, label, help, errors, required, class) -%}