{% extends 'django_forms_workflows/base.html' %} {% load static %} {% load crispy_forms_tags %} {% load forms_workflows_tags %} {% block title %}Approve Submission #{{ submission.id }} - {{ site_name }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

Review Submission

{% if sub_workflow_instance %}
{{ sub_workflow_instance.label }} — this is a payment approval request for Submission #{{ submission.id }}.
{% endif %} {% if workflow_mode != "none" %}
Approval Progress
{% if workflow_mode == "staged" %} {# ---- staged pipeline ---- #}
{% for stage in approval_stages %}
{% if stage.is_completed %} {% elif stage.is_rejected %} {% else %}{{ stage.number }}{% endif %}
{{ stage.name }}
{% if stage.approval_logic == "all" %}Requires all approvers {% elif stage.approval_logic == "any" %}One approver needed {% else %}Sequential Step-by-step Approval{% endif %} {% if stage.total_count > 0 %}
{{ stage.approved_count }}/{{ stage.total_count }} approved{% endif %}
{% if not forloop.last %}
{% endif %} {% endfor %}
{% if current_stage_number and total_stages %}

Stage {{ current_stage_number }} of {{ total_stages }}

{% endif %} {% elif workflow_mode == "sequence" %} {# ---- sequential legacy ---- #}
{% 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 %}
{% elif workflow_mode == "all" or workflow_mode == "any" %} {# ---- parallel legacy (all/any) ---- #} {% if workflow_mode == "all" %}

All groups listed below must approve this submission.

{% else %}

Any one of the groups below can approve this submission.

{% endif %}
{% for pt in parallel_tasks %}
{% if pt.task.status == 'approved' %} {% elif pt.task.status == 'rejected' %} {% else %}{% endif %}
{{ pt.group_name }}
{% endfor %}
{% endif %}
{% endif %}
Submission Information
{% with pdf=submission.form_definition.pdf_generation %} {% if pdf != 'none' %} View PDF Download PDF {% endif %} {% endwith %}

Form: {{ submission.form_definition.name }}

Submitter: {% if submission.submitter %}{{ submission.submitter.get_full_name|default:submission.submitter.username }}{% else %}Anonymous{% endif %}

Email: {% if submission.submitter %}{{ submission.submitter.email }}{% else %}N/A{% endif %}

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

Status: {{ submission.get_status_display }}

{% if workflow_mode == "staged" and current_stage_number and total_stages %}

Current Stage: {{ current_stage_number }} of {{ total_stages }}

{% elif workflow_mode == "sequence" and 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{% if allow_edit_form_data %} (Editable){% endif %}
{% if allow_edit_form_data and editable_form %} {{ editable_form|crispy }} {% else %} {% include "django_forms_workflows/_form_data_rows.html" %}
{% endif %}
{% if resolved_attachments %}
Attachments
    {% for att in resolved_attachments %}
  • {% if att.url %} {{ att.filename }} {% else %} {{ att.filename }} {% endif %}
  • {% endfor %}
{% endif %} {% if approval_step_sections %} {% for section in approval_step_sections %}
{{ section.step_name }} {% if section.status == 'approved' %} Approved {% elif section.status == 'rejected' %} Rejected {% endif %}
{% if section.completed_by %}
by {{ section.completed_by }}{% if section.completed_at %} · {{ section.completed_at|date:"N j, Y \a\t g:i a" }}{% endif %}
{% endif %} {% if section.comments %}

Public “{{ section.comments }}”

{% endif %} {% if section.fields %} {% for field in section.fields %} {% if field.type == 'section' %} {% else %} {% endif %} {% endfor %}
{{ field.label }}
{{ field.label }} {% include "django_forms_workflows/_field_value.html" with entry=field %}
{% else %}

No fields recorded for this step.

{% endif %}
{% endfor %} {% endif %}
{% csrf_token %}
{% if current_step_number %}Step {{ current_step_number }}: {% endif %}{{ task.step_name }} Your Action Required

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

{{ approval_step_form|crispy }}
Your Decision
{% if not hide_comment_field %}
This comment is visible to the submitter and appears on the public submission record.
{% endif %}
Back
{% if send_back_stages %}

Use this option when data entered by a previous stage approver needs to be corrected. The submission will not be rejected — it will be returned to the selected stage so the approver there can revise their entries and re-approve.

{% csrf_token %}
{% endif %} {% if allow_reassign %} {% endif %} {% else %}
Submission Data{% if allow_edit_form_data %} (Editable){% endif %}
{% if allow_edit_form_data and editable_form %} {{ editable_form|crispy }} {% else %} {% include "django_forms_workflows/_form_data_rows.html" %}
{% endif %}
{% if resolved_attachments %}
Attachments
    {% for att in resolved_attachments %}
  • {% if att.url %} {{ att.filename }} {% else %} {{ att.filename }} {% endif %}
  • {% endfor %}
{% endif %} {% if approval_step_sections %}
Prior Approval Step Responses
{% for section in approval_step_sections %}
{{ section.step_name }}
{% if section.status == "approved" %} ✓ Approved {% elif section.status == "rejected" %} ✗ Rejected {% endif %}
{% if section.completed_by %}
by {{ section.completed_by }}{% if section.completed_at %} · {{ section.completed_at|date:"N j, Y \a\t g:i a" }}{% endif %}
{% endif %} {% if section.comments %}

Public “{{ section.comments }}”

{% endif %}
{% if section.fields %}
{% for field in section.fields %} {% endfor %}
{{ field.label }} {% if field.value.url %} {% if field.value.content_type and 'image' in field.value.content_type %}
{{ field.value.filename }}
{% endif %} {{ field.value.filename }} {% if field.value.size %}({{ field.value.size|filesizeformat }}){% endif %} {% elif field.value.path %} {{ field.value.filename }} (File stored but URL unavailable) {% elif field.value|is_signature %} Signature {% elif field.value.0.filename %}
    {% for f in field.value %}
  • {% if f.url %} {% if f.content_type and 'image' in f.content_type %}
    {{ f.filename }}
    {% endif %} {{ f.filename }} {% if f.size %}({{ f.size|filesizeformat }}){% endif %} {% else %} {{ f.filename }} {% endif %}
  • {% endfor %}
{% else %} {{ field.value }} {% endif %}
{% endif %}
{% endfor %}
{% endif %}
Your Decision
{% csrf_token %} {% if not hide_comment_field %}
This comment is visible to the submitter and appears on the public submission record.
{% endif %}
Back
{% if send_back_stages %}

Use this option when data entered by a previous stage approver needs to be corrected. The submission will not be rejected — it will be returned to the selected stage so the approver there can revise their entries and re-approve.

{% csrf_token %}
{% endif %} {% if allow_reassign %} {% endif %} {% endif %}
{% endblock %} {% block extra_js %} {% endblock %}