aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/templates
diff options
context:
space:
mode:
authorAdam Novak2020-04-17 12:02:51 -0700
committerAdam Novak2020-04-17 12:02:51 -0700
commit3a10517123c261d5ce26f174b97764fcaad06e93 (patch)
tree69c16ec4ed43dfa8d207373b07a2157bf3dba1c0 /bh20simplewebuploader/templates
parent6c09aa8e672acd8c0deb593150ab3d0e5893d2ae (diff)
downloadbh20-seq-resource-3a10517123c261d5ce26f174b97764fcaad06e93.tar.gz
bh20-seq-resource-3a10517123c261d5ce26f174b97764fcaad06e93.tar.lz
bh20-seq-resource-3a10517123c261d5ce26f174b97764fcaad06e93.zip
Create option dropdowns from an options file
Diffstat (limited to 'bh20simplewebuploader/templates')
-rw-r--r--bh20simplewebuploader/templates/form.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html
index 9cfb60f..012b9c5 100644
--- a/bh20simplewebuploader/templates/form.html
+++ b/bh20simplewebuploader/templates/form.html
@@ -211,7 +211,6 @@
<div id="metadata_fill_form_spot">
<div id="metadata_fill_form">
- {{ record }}
{% for record in fields %}
{% if 'heading' in record %}
@@ -228,8 +227,17 @@
<a href="{{ record['ref_iri'] }}" title="More Info" target="_blank">?</a>
{% endif %}
</label>
+ {% if record['type'] == 'select' %}
+ <select id="{{ record['id'] }}" name="{{ record['id'] }}" {{ "required" if record['required'] else "" }}>
+ <option value="" selected>Choose one...</option>
+ {% for option in record['options'] %}
+ <option value="{{ option[1] }}">{{ option[0] }}</option>
+ {% endfor %}
+ </select>
+ {% else %}
<input type="{{ record['type'] }}" id="{{ record['id'] }}" name="{{ record['id'] }}" {{ "required" if record['required'] else "" }}>
{% endif %}
+ {% endif %}
{% if loop.index == loop.length %}
</div>
{% endif %}