From d13eae313b5e498017aadfb59520685a6e829213 Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Wed, 31 Jan 2018 11:57:20 +0000
Subject: [PATCH] Move the form media after jquery has been initialised

---
 opentech/apply/funds/templates/funds/fund_type.html | 8 ++++++--
 opentech/apply/funds/widgets.py                     | 1 -
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/opentech/apply/funds/templates/funds/fund_type.html b/opentech/apply/funds/templates/funds/fund_type.html
index 6036836f7..747edab9c 100644
--- a/opentech/apply/funds/templates/funds/fund_type.html
+++ b/opentech/apply/funds/templates/funds/fund_type.html
@@ -27,9 +27,8 @@
         <h3>{% trans "Sorry this fund is not accepting applications at the moment" %}</h3>
     {% else%}
         <form class="form" action="" method="POST">
-            {{ form.media }}
             {% csrf_token %}
-          
+
             {% for field in form %}
               {% if field.field %}
                 {% include "funds/includes/field.html" %}
@@ -42,3 +41,8 @@
     {% endif %}
 </div>
 {% endblock %}
+
+
+{% block extra_js %}
+    {{ form.media }}
+{% endblock %}
diff --git a/opentech/apply/funds/widgets.py b/opentech/apply/funds/widgets.py
index 99b9c9e6c..4681d7864 100644
--- a/opentech/apply/funds/widgets.py
+++ b/opentech/apply/funds/widgets.py
@@ -60,7 +60,6 @@ class AddressWidget(NestedMultiWidget):
 
     class Media:
         js = (
-            "http://code.jquery.com/jquery-3.3.1.min.js",
             'https://cdn.jsdelivr.net/npm/jquery.addressfield@1.1.0/dist/jquery.addressfield.js',
             "address_form.js",
             )
-- 
GitLab