{% 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 read_only %}
View only. You're a reviewer on this form — you can see the submission and approval history, but the decision form is hidden because you aren't authorised to action this step.
{% endif %} {% if acting_on_behalf %}
Acting on behalf of {{ assignee_display|default:"the assignee" }}. Your decision will be recorded as completed by you, with the original assignee preserved for audit.
{% endif %} {% 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 %} {% crispy editable_form %} {% 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.display_label|default:section.step_name }} {% if section.status == 'approved' %} Approved {% elif section.status == 'rejected' %} Rejected {% endif %}
{% if section.completed_by %}
by {{ section.completed_by }}{% if section.is_surrogate %} (on behalf of {{ section.assigned_to }}){% endif %}{% 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 %} {% include "django_forms_workflows/_form_data_rows.html" with form_data_ordered=section.fields %}
{% else %}

No fields recorded for this step.

{% endif %}
{% endfor %} {% endif %} {% if not read_only %}
{% csrf_token %}
{{ task.display_label }} Your Action Required

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

{% crispy approval_step_form %}
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 %} {% endif %}{# /if not read_only — branch 1 write actions #} {% else %}
Submission Data{% if allow_edit_form_data %} (Editable){% endif %}
{% if allow_edit_form_data and editable_form %} {% crispy editable_form %} {% 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.display_label|default:section.step_name }}
{% if section.status == "approved" %} ✓ Approved {% elif section.status == "rejected" %} ✗ Rejected {% endif %}
{% if section.completed_by %}
by {{ section.completed_by }}{% if section.is_surrogate %} (on behalf of {{ section.assigned_to }}){% endif %}{% 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 %}
{% include "django_forms_workflows/_form_data_rows.html" with form_data_ordered=section.fields %}
{% endif %}
{% endfor %}
{% endif %} {% if not read_only %}
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 %}{# /if not read_only — branch 2 write actions #} {% endif %}
{% endblock %} {% block extra_js %} {% endblock %}