{# One instance's settings in the module's sheet, as the context of routes.py get_module_config_form gives them: the shared block, the instance chips, the module's own fields in one column, then the core's settings in three folded rows (their one-line summaries are drawn by summary.js), Save, and a footer. A [data-region] is swapped by itself after a save (sheet.js). #} {% set selected = chips | selectattr("selected") | first %} {% set toggle_url = "/admin/panels/modules/config/" ~ module_name ~ "/toggle?instance_id=" ~ instance_id %}
{% if shared_block %} {# Open when a required shared setting is empty; summary.js then names what is missing in the summary slot #}
Shared settings {{ shared_block.summary }}
{{ shared_block.html | safe }}
{% endif %}
{% for chip in chips %} {% if chip.selected %} {# The name is the chip: blank gives the module's own name and a number #} {% else %} {% endif %} {% endfor %} {% if not is_new %} {% endif %}
{% if is_new %}

A new one on the mirror. Choose where it goes, then select Add to mirror.

{% endif %} {% if module_form %}
{{ module_form | safe }}
{% endif %}
{% for key, title, rows in [("placement", "Placement", placement_form), ("when", "When it shows", when_form), ("heading", "Heading", heading_form)] %}
{{ title }}
{{ rows | safe }}
{% endfor %}
{# Outside the form: these post by themselves, not with Save #}