{% extends "admin/change_form.html" %}
{% load crispy_forms_tags %}
{% load i18n %}

{% block object-tools-items %}
<style>
    li.tools-button { padding-bottom: 15px; background: none; }
    li.tools-button:hover { padding-bottom: 15px; background: none; }
    li.tools-button form { padding-bottom: 15px; }
    #refus { width: 400px; }
</style>
{% if validation %}
<li class="tools-button"><form method="post" style="float: left" action="valider/"><input type="submit" name="_valider" value="{% trans "Valider" %}"/>{% csrf_token %}</form></li>
{% endif %}
<li class="tools-button"><form method="post" style="float: left" action="invalider/"><input type="text" name="raison" placeholder="Raison du refus" id="refus"/><input type="submit" name="_invalider" value="{% trans "Bloquer" %}"/>{% csrf_token %}</form></li>
{% endblock %}

{% block footer %}
{% include "appli_socle/osm_map.html" %}
<script type="text/javascript">
    x = django.jQuery('.field-position_geographique2 p');
    x.attr('data-coordinate', x.contents()[0].textContent);
    x.html('');
    x.width(400);
    x.height(400);
    django.jQuery(function () { init(x); });
</script>
{{ block.super }}
{% endblock %}
