{% extends 'ddm/project_admin/generic/page_with_form.html' %}

{% block page_title %}Delete Blueprint{% endblock %}

{% block main_heading %}Delete Blueprint "{{ object.name }}"{% endblock %}

{% block main_top %}
<p>You are about to delete the following blueprint:</p>
<div>
  <table class="table">
    <tr>
      <td style="width: 16%">Name:</td>
      <td>{{ object.name }}</td>
    </tr>
    <tr>
      <td>File Format:</td>
      <td>{{ object.exp_file_format }}</td>
    </tr>
    <tr>
      <td>Expected Fields:</td>
      <td>{{ object.expected_fields }}</td>
    </tr>
    <tr>
      <td>Extracted Fields:</td>
      <td>{{ object.extracted_fields }}</td>
    </tr>
  </table>
</div>
<div>
  <div>All collected data associated with this blueprint will also be deleted.</div>
  <div>
    <p>The following questions and instructions associated with this blueprint will also be deleted:</p>
    <div>
      <p><b>Instructions:</b></p>
      <ul>
        {% for instruction in object.instruction_set.all %}
        <li>{{ instruction }}</li>
        {% empty %}
        No instructions associated to this blueprint were found.
        {% endfor %}
      </ul>
    </div>
    <div>
      <p><b>Questions:</b></p>
      <ul>
        {% for question in object.questionbase_set.all %}
        <li>{{ question }}</li>
        {% empty %}
        No questions associated to this blueprint were found.
        {% endfor %}
      </ul>
    </div>
  </div>
</div>
{% endblock %}

{% block main_form %}
<form method='post'>
  {% csrf_token %}
  <p>Are you sure you want to delete this blueprint along with all associated data, questions, and instructions? <b>This action cannot be reversed.</b></p>
  <input class="btn-a btn-danger" type="submit" value="Delete blueprint">
</form>
{% endblock %}

{% block breadcrumbs %}
Back to:
<a href="{% url 'project-list' %}">Projects</a> /
<a href="{% url 'project-detail' project_pk %}">Project Cockpit</a> /
<a href="{% url 'blueprint-list' project_pk %}">Donation Blueprints</a>
{% endblock %}
