aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2020-04-25 19:35:54 +0300
committerBonfaceKilz2020-04-25 19:35:54 +0300
commit414a8028638039d4113e099455c0a7f929ff0b68 (patch)
tree32beb8a75bcec491c151400a1457f1c8d2dd1708
parent8ea8f7c2ed50bb089df26ae497e9d274c04705c8 (diff)
downloadbh20-seq-resource-414a8028638039d4113e099455c0a7f929ff0b68.tar.gz
bh20-seq-resource-414a8028638039d4113e099455c0a7f929ff0b68.tar.lz
bh20-seq-resource-414a8028638039d4113e099455c0a7f929ff0b68.zip
Reposition sponsor logo at the bottom
-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>