18F/forest-service-prototype

View on GitHub
forestserviceprototype/specialuseform/templates/specialuseform/submitted_permit.html

Summary

Maintainability
Test Coverage
{% extends "specialuseform/base.html" %}

{% block content %}
  <h1>Received Application</h1>
  {% if not check_status %}
    <div class="usa-alert usa-alert-success">
      <div class="usa-alert-body" role="alert">
        <h3 class="usa-alert-heading">Application Submitted Successfully</h3>
        <p class="usa-alert-text">Application #{{ permit.id }}: {{ permit.event_name }} is in the queue.</p>
      </div>
    </div>
{% endif %}

  <h3>Permit Status: <span id="permit-status">{{ permit.get_status_display }}</span></h3>

  {% if user.is_authenticated %}
  <div id="application-review">
  <form action="{% url 'change-application' permit.id 'approved' %}" method="post" id="approve-form">
    {% csrf_token %}
    <button type="submit" name="approve">Approve application</button>
  </form>

  <form action="{% url 'change-application' permit.id 'not_approved' %}" method="post" id="deny-form">
    {% csrf_token %}
    <button type="submit" name="deny">Deny application</button>
    <span class="usa-input-error-message" id="deny-error-message" role="alert"></span>
    <label for="input-type-textarea">Reason for denying application</label>
    <textarea id="input-type-textarea" name="input-type-textarea" value="{{ permit.decision_explanation}}">{{ permit.decision_explanation}}</textarea>
  </form>
</div>

  {% endif %}

  <p>You will receive an email notification from the Forest Service in a few days about whether your permit has been approved.
    If you do not hear back from the Forest Service, please call XXX-XXX-XXXX.
    Please review your information to make sure it is correct.</p>
    {% if not user.is_authenticated %}
      {% if permit.status == 'needs_approval' %}
        <a href="{% url 'edit' permit.id %}"><button>Edit Permit Information</button></a>
        <a href="{% url 'cancel' permit.id %}"><button>Cancel Application</button></a>
      {% endif %}
      {% if permit.status == 'approved' %}
        <a href="{% url 'print_permit' permit.id %}"><button>Print Application</button></a>
      {% endif %}
    {% endif %}
  <table>
    {% for field in permit_dict %}
      <tr>
          <th scope="col">{{ field.label }}</th><th scope="row">{{ field.data }}</th>
      </tr>
    {% endfor %}
  </table>

{% endblock content %}