{% if widget.optgroups %} {% with id=widget.attrs.id %}
{% for group, options, index in widget.optgroups %} {% if group %}
{% endif %} {% if forloop.counter|divisibleby:3 %}
{% endif %} {% endfor %}
{% endwith %} {% else %} {% load i18n wagtailadmin_tags %}
{# {% icon name="plus-inverse" classname="default w-mr-2.5 w-align-middle" %}#} {% icon name="plus-inverse" classname="icon" %} {% trans "Add " %}{{ widget.model_name }}
{% endif %}