data_capture/templates/data_capture/bulk_upload/region_10_step_2.html

Summary

Maintainability
Test Coverage
{% extends 'data_capture/bulk_upload/region_10_step.html' %}
{% load humanize %}

{% block subtitle %}Confirm load{% endblock subtitle %}

{% block step_body %}
  {% with total=file_metadata.num_rows %}
    {% if total %}
      <h3>{{ total|intcomma }} row{{ total|pluralize }} ready to add to CALC</h3>
      <p>Are you ready to <strong>delete all existing Region 10 data</strong> and replace it with the {{ total|intcomma }} new row{{ total|pluralize }} of data you just uploaded?</p>
    {% else %}
      <p>No valid rows were found in the uploaded spreadsheet. Please check your file and <a href="{% url 'data_capture:bulk_region_10_step_1' %}">try again</a>.</p>
    {% endif %}

    <form method="post" action="{% url 'data_capture:bulk_region_10_step_2' %}" class="form--contract_details">
      {% csrf_token %}
      <div class="form-button-row align-left clearfix">
        {% if total %}
          <div class="submit-group">
            <button type="submit" class="usa-button usa-button-primary" name="submit">Yes, replace data</button>
          </div>
          <button type="submit" class="usa-button usa-button-secondary" name="cancel" data-a11y-dialog-show="cancel-dialog">No, cancel upload</button>
        {% else %}
          <button type="submit" class="usa-button usa-button-link" name="cancel" data-a11y-dialog-show="cancel-dialog">Cancel this upload</button>
        {% endif %}
      </div>
    </form>
  {% endwith %}
{% endblock step_body %}