{# Shared per-rule toggle form. Used by issues / suggestions / storage-billing pages. Caller sets: - heading : page heading - subheading : page subheading - empty_message : message when ``rules`` is empty - form_action : POST URL the form submits to - rules : list of {rule_type, display_name, description, is_enabled} - saved : flash bool - errors : dict #}

{{ heading }}

{{ subheading }}

{% if errors and errors.get('_general') %}
{{ errors['_general'] }}
{% endif %} {% if saved %}
Saved.
{% endif %} {% if not rules %}

{{ empty_message }}

{% else %}
Active rules

{{ rules | length }} rule{{ '' if rules|length == 1 else 's' }} on this page.

{% for rule in rules %} {% endfor %}

Changes apply on the next scan.

{% endif %}