{% extends "index.html" %}
{% block content %}
{% load url from future %}

{% if user.is_authenticated %}
<div id="pdfUpload">
	<form action="{% url 'import' %}" method="post" enctype="multipart/form-data">
		{{ form.non_field_errors }}
		{% csrf_token %}
		<pre>
		{{ form.bibtex.errors }}
		</pre>
		<div class="bibtexImportField">
			<label for="id_bibtex">Bibtex file:</label>
			{{ form.bibtex }}
		</div>
		<div class="submitField">
			<input type="submit" value="Import" />
		</div>
	</form>
</div>

{% else %}
You must <a href="{% url 'login' next='import' %}">log in</a> to continue.
{% endif %}

{% endblock %}
