{% extends "admin/base_site.html" %}
{% load i18n admin_static admin_modify %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static 'admin/css/forms.css' %}" />{% endblock %}

{% block breadcrumbs %}
	<div class="breadcrumbs">
		<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> &rsaquo;
		<a href="../../">{% trans 'Publications' %}</a> &rsaquo;
		<a href="../">{% trans 'Publications' %}</a> &rsaquo;
		{% trans 'Import BibTex' %}
	</div>
{% endblock %}

{% block content %}
	<div id="content-main">
		<form method="post">
			{% csrf_token %}
			{{ bib }}
			<div>
				{% if errors %}
				<p class="errornote">{% trans 'Please correct the errors below.' %}</p>
				{% endif %}
				<fieldset class="module aligned">
					{% if errors.bibliography %}
					<div class="form-row errors">
						<ul class="errorlist"><li>{{ errors.bibliography }}</li></ul>
					{% else %}
					<div class="form-row">
					{% endif %}
						<div>
							<label for="id_bibliography" class="required">{% trans 'Bibliography' %}:</label>
							<textarea rows="20" cols="80" name="bibliography" id="id_bibliography">{{ request.POST.bibliography }}</textarea>
							<p class="help">{% trans 'Required keys: title, author and year.' %}</p>
						</div>
					</div>
				</fieldset>
				<div class="submit-row">
					<input type="submit" value="{% trans 'Import' %}" class="default" name="_save" />
				</div><br clear="all" />
			</div>
		</form>
	</div>
{% endblock %}
