aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bh20simplewebuploader/static/main.js7
-rw-r--r--bh20simplewebuploader/templates/form.html7
2 files changed, 7 insertions, 7 deletions
diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js
index fba791d..9373199 100644
--- a/bh20simplewebuploader/static/main.js
+++ b/bh20simplewebuploader/static/main.js
@@ -165,13 +165,6 @@ function removeField(e) {
}
}
-// Find all the add and remove field buttons and hook up the listeners.
-for (let button of document.getElementsByClassName('add-field')) {
- button.addEventListener('click', addField)
-}
-for (let button of document.getElementsByClassName('remove-field')) {
- button.addEventListener('click', removeField)
-}
// Change the submit button after hitting
function on_submit_button() {
diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html
index f36177e..7084f58 100644
--- a/bh20simplewebuploader/templates/form.html
+++ b/bh20simplewebuploader/templates/form.html
@@ -145,6 +145,13 @@
{% include 'footer.html' %}
<script type="text/javascript">
+ // Find all the add and remove field buttons and hook up the listeners.
+ for (let button of document.getElementsByClassName('add-field')) {
+ button.addEventListener('click', addField)
+ }
+ for (let button of document.getElementsByClassName('remove-field')) {
+ button.addEventListener('click', removeField)
+ }
// let scriptRoot = {{ request.script_root|tojson|safe }};
let uploadForm = document.getElementById('metadata_upload_form')
let uploadFormSpot = document.getElementById('metadata_upload_form_spot')