{% extends 'base.html' %}
{% load custom_tags_and_filters %}
{% load static %}
{% load tz %}
{% block title %}Create publication{% endblock %}
{% block content %}
    <h1 class="form-group">Create publication</h1>
    <form class="well" action="{% url 'search_publication' %}" method="post">
        {% csrf_token %}
        {% if error %}<div class="alert alert-danger">{{ error }}</div>{% endif %}
        <div class="row">
            <div class="col-md-12">
                <label for="doi">Search Publication By DOI</label>
            </div>
            <div class="col-md-10 col-sm-10">
                <input type="text" id="doi" name="doi" class="form-control" required>
            </div>
            <div class="col-md-2 col-sm-2">{% button type="view" submit="true" value="Search" %}</div>
        </div>
    </form>
    <script>
	$("#doi").autocomplete("user_pub_status", function(){}, {{ user_publications|json_search_base:"doi" }}, false, true)
    </script>
{% endblock %}
