diff options
author | Pjotr Prins | 2020-04-19 12:22:17 -0500 |
---|---|---|
committer | GitHub | 2020-04-19 12:22:17 -0500 |
commit | 71adc4706ce6e5e6f354f8cb703a0ae4d1f555e4 (patch) | |
tree | 38d2099ecbb7b5237c8403c1ee62cfd9a9ac6801 /bh20simplewebuploader/templates/form.html | |
parent | 3bee6777fb4a61febbf1c22e62d71d933cfba4b0 (diff) | |
parent | 065b089ae034313c2e057647e494f4fb39331e03 (diff) | |
download | bh20-seq-resource-71adc4706ce6e5e6f354f8cb703a0ae4d1f555e4.tar.gz bh20-seq-resource-71adc4706ce6e5e6f354f8cb703a0ae4d1f555e4.tar.lz bh20-seq-resource-71adc4706ce6e5e6f354f8cb703a0ae4d1f555e4.zip |
Merge branch 'master' into patch-6
Diffstat (limited to 'bh20simplewebuploader/templates/form.html')
-rw-r--r-- | bh20simplewebuploader/templates/form.html | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html index df66e8c..6993cf5 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 %} @@ -221,15 +220,27 @@ <div class="record"> <h4>{{ record['heading'] }}</h4> {% else %} - <label for="{{ record['id'] }}"> + <label for="{{ record['id'] }}" title="{{ record.get('docstring', '') }}"> {{ record['label'] }} {{ "*" if record['required'] else "" }} - {% if 'ref_url' in record %} - <a href="{{ record['ref_url'] }}" title="More Info" target="_blank">?</a> + {% if 'docstring' in record %} + <a href='javascript:alert({{ record['docstring'] | tojson }})'>❓</a> + {% endif %} + {% if 'ref_iri' in record %} + <a href="{{ record['ref_iri'] }}" target="_blank" title="Ontology Link">🔗</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 %} |