{% set sidx = loop.index0 %}
{% if step.content_md %}
{{ step.content_md | safe }}
{% endif %} {% set schema = step.config_schema | default({}) %}
⚙ Configuration Panel
{% if schema.fields %} {% for field in schema.fields %} {# Authored content keys its fields by `id`; an input rendered with an empty name is dropped by FormData, so the learner's answers never left the page. #} {% set fname = field.name or field.id %}
{# aca-trn-06: this label sits BESIDE its control rather than wrapping it, so without `for` it named nothing — select, textarea and text inputs were all reaching the a11y tree unlabelled. The checkbox branches below do wrap their inputs, so those were already associated. #} {% if field.type == 'select' %} {% elif field.type == 'checkbox' %} {% elif field.type == 'checkboxes' %}
{% for opt in field.options | default([]) %} {% endfor %}
{% elif field.type == 'textarea' %} {% else %} {% endif %} {% if field.hint %}
{{ field.hint }}
{% endif %}
{% endfor %} {% elif not schema.action %} {# Steps discovered from lesson files carry no field schema, so this panel offered nothing to fill in, promised to "execute this action", and recorded {}. Capture the learner's answer to the lesson's task instead. #}
{% else %}

Click Configure to execute this action with default settings.

{% endif %}