{#- The per-category spec fields. Every category's fieldset is rendered and all but the selected one is hidden, so switching category needs no fetch and no round-trip — and the form still works with JS off (every fieldset is present, just collapsed). 🔴 Field names are PREFIXED `spec.` so a spec can never collide with a column name: `name` the item and `name` a hypothetical spec would otherwise be the same key. -#} {% macro spec_fields(categories, current='', values={}) %} {% for c in categories %}
{% for f in c.fields %} {% endfor %}
{% endfor %} {% endmacro %}