{% extends "forms.html" %}


{% block title %}Application{% endblock %}


{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href='{% url "index" %}'>Home</a>&nbsp;›
    <a href="{% url 'kg_application_list' %}">Applications</a>&nbsp;›
    {{ application }}
</div>
{% endblock %}


{% block content %}
<div class="module">
    <h2>Steal Application from {{ application.applicant }}?</h2>
    <p>Your are about to give {{ person }} this application. {{ reason }} The
    application currently belongs to:</p>

    <div class="table-container">
        <table class="keyvalue">
            <tr><th>Name:</th><td>{{ application.applicant }}</td></tr>
            <tr><th>E-Mail:</th><td>{{ application.applicant.email }}</td></tr>
            <tr><th>Position:</th><td>{{ application.applicant.position|default:"" }}</td></tr>
            <tr><th>Department:</th><td>{{ application.applicant.department|default:"" }}</td></tr>
            {% if application.institute %}
            <tr><th>Institute:</th><td><a href="{{ application.applicant.institute.get_absolute_url }}">{{ application.applicant.institute }}</a></td></tr>
            {% endif %}
        </table>
    </div>

    <p><b>{{ details }}</b></p>

    <p>If you continue, the application will get the following details.</p>

    <div class="table-container">
        <table class="keyvalue">
            <tr><th>Name:</th><td>{{ person }}</td></tr>
            <tr><th>E-Mail:</th><td>{{ person.email }}</td></tr>
            <tr><th>Position:</th><td>{{ person.position|default:"" }}</td></tr>
            <tr><th>Department:</th><td>{{ person.department|default:"" }}</td></tr>
            <tr><th>Institute:</th><td><a href="{{ person.institute.get_absolute_url }}">{{ person.institute }}</a></td></tr>
        </table>
    </div>

    <p>Are you sure you want to continue???</p>

    <form method="post" action=".">{% csrf_token %}
        {% for field in form %}{{ field.as_hidden }}
        {% endfor %}
        <div>
            <input type="hidden" name="steal" value="yes" />
            <input type="submit" value="Yes, I'm sure" />
        </div>
    </form>
</div>
{% endblock %}
