diff options
author | Pjotr Prins | 2020-05-16 12:08:57 -0500 |
---|---|---|
committer | Pjotr Prins | 2020-05-16 12:08:57 -0500 |
commit | d0060bc74ee1f4bffdf89af4cfaa3ffa0c96b3e5 (patch) | |
tree | b55dfc341837b648dfadb8b4acf8c58a631d0c19 /bh20simplewebuploader | |
parent | 89dbb86a7efa9badf0fbccdf467eaae43fb9a9f4 (diff) | |
parent | f1d0f4faa2cc4496f5e0df679db0e716ceeac5b2 (diff) | |
download | bh20-seq-resource-d0060bc74ee1f4bffdf89af4cfaa3ffa0c96b3e5.tar.gz bh20-seq-resource-d0060bc74ee1f4bffdf89af4cfaa3ffa0c96b3e5.tar.lz bh20-seq-resource-d0060bc74ee1f4bffdf89af4cfaa3ffa0c96b3e5.zip |
Merge branch 'master' of github.com:pjotrp/bh20-seq-resource
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r-- | bh20simplewebuploader/static/main.js | 5 | ||||
-rw-r--r-- | bh20simplewebuploader/templates/form.html | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index bf95832..024a101 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -50,10 +50,6 @@ let fetchAllaccessions = () => { * may not expect. */ -let uploadForm = document.getElementById('metadata_upload_form') -let uploadFormSpot = document.getElementById('metadata_upload_form_spot') -let fillForm = document.getElementById('metadata_fill_form') -let fillFormSpot = document.getElementById('metadata_fill_form_spot') function setUploadMode() { // Make the upload form the one in use. @@ -87,7 +83,6 @@ function setMode() { // have set the radio button to whatever the state was on last page load, // instead of the default state, without raising an event, and we have to // handle that. -setMode() /** * Add another form field to the group this button is part of. diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html index 2cbaf62..1227ca2 100644 --- a/bh20simplewebuploader/templates/form.html +++ b/bh20simplewebuploader/templates/form.html @@ -114,7 +114,7 @@ {% for record in fields %} {% if 'heading' in record %} - {% if loop.index > 1 and 2 < 3 %} + {% if loop.index > 1 and 2 < 3 %} <!-- for emacs matching elements --> </div> {% endif %} <div class="record"> <!-- from block, e.g. host fields --> @@ -211,6 +211,12 @@ <script type="text/javascript"> let scriptRoot = {{ request.script_root|tojson|safe }}; + let uploadForm = document.getElementById('metadata_upload_form') + let uploadFormSpot = document.getElementById('metadata_upload_form_spot') + let fillForm = document.getElementById('metadata_fill_form') + let fillFormSpot = document.getElementById('metadata_fill_form_spot') + + setMode() document.addEventListener("DOMContentLoaded", function(){ var count = fetch("/api/getCount") |