From 7bafc8971301616f4fd5cd16e3bb49d3ab28b506 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sat, 8 Feb 2020 20:27:22 +0100 Subject: [PATCH] Add form media to each page --- templates/base.html | 6 ++++++ templates/note/transaction_form.html | 4 ---- templates/note/transactiontemplate_form.html | 4 ---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/templates/base.html b/templates/base.html index 05328d0c..294da4e0 100644 --- a/templates/base.html +++ b/templates/base.html @@ -31,6 +31,12 @@ SPDX-License-Identifier: GPL-3.0-or-later crossorigin="anonymous"> + + {# Si un formulaire requiert des données supplémentaires (notamment JS), les données sont chargées #} + {% if form.media %} + {{ form.media }} + {% endif %} + {% block extracss %}{% endblock %} diff --git a/templates/note/transaction_form.html b/templates/note/transaction_form.html index 2a480fc8..ff8504bc 100644 --- a/templates/note/transaction_form.html +++ b/templates/note/transaction_form.html @@ -35,7 +35,3 @@ SPDX-License-Identifier: GPL-2.0-or-later {% endblock %} - -{% block extracss %} - {{ form.media }} -{% endblock extracss %} diff --git a/templates/note/transactiontemplate_form.html b/templates/note/transactiontemplate_form.html index 5911d5d2..3fc2dd8b 100644 --- a/templates/note/transactiontemplate_form.html +++ b/templates/note/transactiontemplate_form.html @@ -9,7 +9,3 @@ {% endblock %} - -{% block extracss %} - {{ form.media }} -{% endblock extracss %} \ No newline at end of file