{% 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 %} {% set print_title -%} {%- if tpl.is_ticket -%} {% trans %}Print tickets{% endtrans %} {%- else -%} {% trans %}Print badges{% endtrans %} {%- endif -%} {%- endset %} {% set endpoint = 'registrations_config_tickets' if tpl.is_ticket else 'registrations_config_badges' %} {% if format == 'icon' %} {% else %} {% if no_registrations %} {{ text }} {% else %} {{ text }} {% endif %} {% endif %} {% endmacro %} {% macro _render_template(tpl, target, inherited=false, event=none, default_ticket=none, default_badge=none, not_deletable_templates=[]) -%}