{% macro _render_badge_form_button(regform, tpl, format='text', text='') %} {% set no_registrations = not regform.registrations|rejectattr('is_deleted')|list %} {% set no_registrations_msg %} {% trans %}Registration Form has no registrations{% endtrans %} {% endset %} {% if format == 'icon' %} {% else %} {% if no_registrations %} {{ text }} {% else %} {{ text }} {% endif %} {% endif %} {% endmacro %} {% macro _render_template(tpl, target, inherited=false, event=none, default_template=none, not_deletable_templates=[]) -%}