{% from 'forms/_form.html' import simple_form, form_fieldset, form_rows, form_row %} {% macro render_badge_print_settings_form(form, submit=_('Download PDF'), templates=none, registrations=()) %} {% call simple_form(form, form_header_kwargs={'id': 'badge-settings-form'}, back=_('Cancel'), submit=submit, disabled_until_change=false, disable_if_locked=false) %} {% for legend, fieldset in form._fieldsets %} {% call form_fieldset(legend, render_as_fieldset=(legend is not none)) %} {{ form_rows(form, fields=fieldset) }} {% endcall %} {% endfor %}
{{ form_row(form.top_margin, orientation='vertical') }}
{{ form_row(form.left_margin, orientation='vertical') }} {{ form_row(form.right_margin, orientation='vertical') }}
{{ form_row(form.bottom_margin, orientation='vertical') }}
{{ form_rows(form, ('margin_columns', 'margin_rows'), orientation='vertical') }}
{% trans -%} Tip: if your printer does not align the badges correctly, you can tweak the margins. {%- endtrans %}
{% trans -%} Example: If your left and right margins are 1.5 cm each, but your printer prints everything 1 mm to the left, you could use a left margin of 1.6 cm and a right margin of 1.4 cm to compensate. If you increase a margin, do not forget to decrease the opposing one to avoid Indico thinking there is less space for printing badges, and the number of rows / columns will change. {%- endtrans %}
{% for registration in registrations %} {% endfor %} {% endcall %} {% if templates %} {% endif %} {% endmacro %}