Parcourir la source

Do not erase default buttons in admin change_form for invoice

Fabs il y a 10 ans
Parent
commit
c681105b17
1 fichiers modifiés avec 2 ajouts et 5 suppressions
  1. 2 5
      coin/templates/admin/billing/invoice/change_form.html

+ 2 - 5
coin/templates/admin/billing/invoice/change_form.html

@@ -1,13 +1,10 @@
 {% extends "admin/change_form.html" %}
 {% load url from future %}
-{% block object-tools %}
-{% if change %}{% if not is_popup %}
-<ul class="object-tools">
+{% block object-tools-items %}
     {% if not original.validated %}
         <li><a href="{% url 'admin:invoice_validate' id=object_id %}">Valider la facture</a></li>
     {% elif original.is_pdf_exists %}
         <li><a href="{% url 'billing:invoice_pdf' id=object_id %}">Télécharger le PDF</a></li>
     {% endif %}
-</ul>
-{% endif %}{% endif %}
+    {{ block.super }}
 {% endblock %}