{% if helpers.exists('OPNsense.captiveportal.zones.zone') %}
{%   for cpZone in  helpers.toList('OPNsense.captiveportal.zones.zone') %}
{%     if cpZone.enabled|default('0') == '1' %}
[zone_{{cpZone.zoneid}}]
authservers={{ cpZone.authservers }}
idletimeout={{ cpZone.idletimeout|default("0") }}
hardtimeout={{ cpZone.hardtimeout|default("0") }}
concurrentlogins={{cpZone.concurrentlogins|default("0")}}
allowedAddresses={{cpZone.allowedAddresses|default("")}}
allowedMACAddresses={{cpZone.allowedMACAddresses|default("")}}

[template_for_zone_{{cpZone.zoneid}}]
content={{helpers.getUUID(cpZone.template).content}}
{%     endif %}
{%   endfor %}
{% endif %}
