{% macro render_field_with_errors(field) %}
{{ field(**kwargs)|safe }} {% if field.errors %} {% endif %}
{% endmacro %} {% macro render_remember_forgot(field, render_forgot=False) %}
{{ field.label }} {{ field(**kwargs)|safe }} {% if render_forgot %} Forgot password? {% endif %}
{% endmacro %} {% macro render_field(field) %}
{{ field(**kwargs)|safe }}
{% endmacro %} {% macro collapse_card_start(title, show=True, data_count=None) %}
{{ title }} {{ ''|safe ~ data_count ~ ''|safe if data_count is not none }}
{% endmacro %} {% macro collapse_card_end(title=None) %}
{{ ""|safe if title is not none }}
{% endmacro %} {% macro card_link_by_title(title, prefix=None) %} {% endmacro %} {% macro render_pagination(offset, limit, total, endpoint) %} {% set num_of_pages = (total / limit) | round(0, 'ceil') | int %} {# Note: cur_page is and index starting at 0, whereas the label on the link will be an page index starting at 1 #} {% set cur_page = (offset / limit) | round(0, 'floor') | int %} {% endmacro %}