{% extends "base.html" %} {% block main_content %}

{{page_title}}

{% for field in form %} {% if field.type == 'HiddenField' or field.type == 'CSRFTokenField' %} {{field}} {% elif field.type != 'SubmitField' %}
{{ field.label( class="col-3" ) }} {{ field( class="form-control col" ) }}
{% endif %} {% endfor %}
{% for refimg in person.refimg %} {% set offset="" %} {% if (loop.index % 10) == 0 %} {% set offset= "offset-3" %} {% endif %}
{{refimg.fname}}
{% endfor %}

{{ form.save( id="save", class="btn btn-primary offset-3 col-2" )}} {% if 'Edit' in page_title %} {{ form.delete( class="btn btn-outline-danger col-2" )}} {% endif %}
{% if person.id %}
{% endif %}
{% endblock main_content %} {% block script_content %} {% endblock script_content %}