about summary refs log tree commit diff
path: root/bh20simplewebuploader/templates/form.html
diff options
context:
space:
mode:
authorBonfaceKilz2020-04-25 19:35:54 +0300
committerBonfaceKilz2020-04-26 07:05:12 +0300
commitdf08a8f191371a5cb0ca30e809809c85fcf62d94 (patch)
tree56baff2a8b7ff615616dad9a773d46732dbd64e1 /bh20simplewebuploader/templates/form.html
parent02752704ef52bb2c2068e8586c9d4062a7fdcadd (diff)
downloadbh20-seq-resource-df08a8f191371a5cb0ca30e809809c85fcf62d94.tar.gz
bh20-seq-resource-df08a8f191371a5cb0ca30e809809c85fcf62d94.tar.lz
bh20-seq-resource-df08a8f191371a5cb0ca30e809809c85fcf62d94.zip
Reposition sponsor logo at the bottom
Diffstat (limited to 'bh20simplewebuploader/templates/form.html')
-rw-r--r--bh20simplewebuploader/templates/form.html79
1 files changed, 46 insertions, 33 deletions
diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html
index f24af0e..9c272a0 100644
--- a/bh20simplewebuploader/templates/form.html
+++ b/bh20simplewebuploader/templates/form.html
@@ -132,11 +132,14 @@
 
                     <hr>
 <div class="footer">
-                    <a href="https://arvados.org/"><img src="static/image/arvados-logo.png" align="top"></a>
-                    <a href="https://www.commonwl.org/"><img src="static/image/CWL-Logo-Header.png" height="70"></a>
+    <!-- Sponsors -->
+    <div class="sponsors">
+        <a href="https://arvados.org/"><img src="static/image/arvados-logo.png" align="top"></a>
+        <a href="https://www.commonwl.org/"><img src="static/image/CWL-Logo-Header.png" height="70"></a>
 
         <a href="https://github.com/virtual-biohackathons/covid-19-bh20">
-        <img src="static/image/covid19biohackathon.png" align="right" height="70"></a>
+            <img src="static/image/covid19biohackathon.png" align="right" height="70"></a>
+    </div>
 
         <center>
         <small><a href="https://github.com/arvados/bh20-seq-resource">Source code</a> &middot; Powered by <a href="https://www.commonwl.org/">Common Workflow Language</a> &amp; <a href="https://arvados.org/">Arvados</a>; Made for <a href="https://github.com/virtual-biohackathons/covid-19-bh20">COVID-19-BH20</a>
@@ -146,35 +149,45 @@
 
 </div>
 
-        <script type="text/javascript">
-         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
-             uploadFormSpot.appendChild(uploadForm)
-             fillFormSpot.removeChild(fillForm)
-         }
-
-         function setFillMode() {
-             // Make the fillable form the one in use
-             uploadFormSpot.removeChild(uploadForm)
-             fillFormSpot.appendChild(fillForm)
-         }
-
-         function setMode() {
-             // Pick mode based on radio
-             if (document.getElementById('metadata_upload').checked) {
-                 setUploadMode()
-             } else {
-                 setFillMode()
-             }
-         }
-
-         // Start in mode appropriate to selected form item
-         setMode()
-        </script>
+<script type="text/javascript">
+ let scriptRoot = {{ request.script_root|tojson|safe }};
+ let r = new XMLHttpRequest();
+ let test;
+ r.open("GET", scriptRoot + "/api/getAllaccessions", true);
+ r.onreadystatechange = function () {
+     if (r.readyState != 4 || r.status != 200) return;
+     test = r.responseText;
+     console.log(JSON.parse(test));
+ };
+ r.send();
+ 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
+     uploadFormSpot.appendChild(uploadForm)
+     fillFormSpot.removeChild(fillForm)
+ }
+
+ function setFillMode() {
+     // Make the fillable form the one in use
+     uploadFormSpot.removeChild(uploadForm)
+     fillFormSpot.appendChild(fillForm)
+ }
+
+ function setMode() {
+     // Pick mode based on radio
+     if (document.getElementById('metadata_upload').checked) {
+         setUploadMode()
+     } else {
+         setFillMode()
+     }
+ }
+
+ // Start in mode appropriate to selected form item
+ setMode()
+</script>
     </body>
 </html>