{% extends "base.html" %} {% block title %}{{ template.name }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{{ template.name }}

{% if template.description %}

{{ template.description }}

{% endif %}
{% if current_user.role in ['admin', 'director'] %} Edit Form
{% endif %} Preview Back
Frequency: {{ template.frequency|title }}
Fields: {{ form_fields|length }}
Inspections: {{ template.inspections.count() }}
{% if template.created_at %}
Created: {{ template.created_at.strftime('%Y-%m-%d') }}
{% endif %}
Form Layout
{% if form_fields %}
{% for f in form_fields %}
{% if f.type == 'section' %}
{{ f.label }}
{% elif f.type == 'table' %}
{{ f.label }}
table · {{ f.col_headers|length if f.col_headers else 3 }} cols × {{ f.table_rows or 3 }} rows {% elif f.type == 'label' %}
{{ f.text_content or 'Label text' }}
label {% elif f.type.startswith('button_') %}
{{ f.btn_label or f.type.replace('button_','') | title }}
{{ f.type.replace('_',' ') }} {% else %}
{{ f.label }}{% if f.required %} *{% endif %}
{{ f.type.replace('_', ' ') }} {% endif %}
{% endfor %}
{% else %}

No fields defined yet.

{% if current_user.role in ['admin', 'director'] %} Open Form Editor {% endif %}
{% endif %}
{% endblock %}