{% extends 'django_forms_workflows/base.html' %} {% load crispy_forms_tags %} {% block title %}Approve Submission #{{ submission.id }} - Django Forms Workflows{% endblock %} {% block content %}

Review Submission

{% if approval_steps %}
Approval Progress
{% for step in approval_steps %}
{% if step.is_completed %}{% elif step.is_rejected %}{% else %}{{ step.number }}{% endif %}
{{ step.group_name }}
{% if not forloop.last %}
{% endif %} {% endfor %}
{% endif %}
Submission Information

Form: {{ submission.form_definition.name }}

Submitter: {{ submission.submitter.get_full_name|default:submission.submitter.username }}

Email: {{ submission.submitter.email }}

Submitted: {{ submission.submitted_at|date:"Y-m-d H:i" }}

Status: {{ submission.get_status_display }}

{% if current_step_number and total_steps %}

Current Step: {{ current_step_number }} of {{ total_steps }}

{% endif %}
{% if has_approval_step_fields and approval_step_form %}
Submission Data
{% for key, value in submission.form_data.items %} {% if not key|slice:":7" == "advisor" and not key|slice:":2" == "fa" and not key|slice:":9" == "registrar" and not key|slice:":7" == "manager" %} {% endif %} {% endfor %}
{{ key|title }} {% if value.url %} {% if value.content_type and 'image' in value.content_type %} {{ value.filename }} {% endif %} {{ value.filename }} {% elif value.path %} {{ value.filename }} {% else %} {{ value }} {% endif %}
{% csrf_token %}
Step {{ current_step_number }}: {{ task.step_name }} Your Action Required

Please review the submission above and fill in the required fields below.

{{ approval_step_form|crispy }}
{% for step in approval_steps %} {% if step.number > current_step_number %}
Step {{ step.number }}: {{ step.group_name }} Pending

This step will be available after all previous steps are approved.

{% endif %} {% endfor %}
Your Decision
Back
{% else %}
Submission Data
{% for key, value in submission.form_data.items %} {% endfor %}
{{ key|title }} {% if value.url %} {# File upload with URL - display as image or link #} {% if value.content_type and 'image' in value.content_type %}
{{ value.filename }}
{% endif %} {{ value.filename }} {% if value.size %}({{ value.size|filesizeformat }}){% endif %} {% elif value.path %} {# File upload with path but no URL #} {{ value.filename }} (File stored but URL unavailable) {% else %} {{ value }} {% endif %}
Your Decision
{% csrf_token %}
Back
{% endif %}
{% endblock %}