{% macro navigation() -%} {% if current_user.email %}
  • Create Pitstop
  • Create Service
  • Create Regular Cost
  • Statistics
  • Account
  • {% if current_user.has_role('admin') %}
  • Admin
  • {% endif %}
  • Logout
  • {% else %}
  • Login
  • Register
  • {% endif %} {%- endmacro %} {% macro render_field_with_errors(field, include_cancel=True) %}
    {% if field.type == 'SubmitField' %}
    {% if include_cancel %} {% endif %}
    {% else %}
    {% if field.type == 'SelectField' %} {% elif field.type == 'SelectMultipleField' %} {% elif field.type == 'BooleanField' %} {% elif field.type == 'StringField' %} {% elif field.type == 'PasswordField' %} {% elif field.type == 'DateField' %} {% elif field.type == 'IntegerField' %} {% elif field.type == 'DecimalField' %} {% elif field.type == 'TextAreaField' %} {% else %} {{ field(**kwargs)|safe }} {% endif %} {% if field.errors %}

    {% for error in field.errors %} {{ error }} {% endfor %}

    {% endif %}
    {% endif %}
    {% endmacro %} {% macro render_login_form() %}

    Login

    {{ login_user_form.hidden_tag() }} {{ render_field_with_errors(login_user_form.email) }} {{ render_field_with_errors(login_user_form.password) }} {{ render_field_with_errors(login_user_form.remember) }} {{ render_field(login_user_form.next) }} {{ render_field_with_errors(login_user_form.submit) }} {% if security.recoverable %} Forgot password {% endif %}
    {% endmacro %} refuel journal {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}
    {% endfor %} {% endif %} {% endwith %}
    {% block body %} {% endblock %}
    {# #}