diff options
author | Frederick Muriuki Muriithi | 2022-07-08 07:32:58 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-07-19 04:46:09 +0300 |
commit | 7a3a54ec40fac9071a513487602957f8418f163e (patch) | |
tree | 4acec2accb54bcb1c2f9c25c39d8f82c4b81be20 /qc_app/templates | |
parent | a21e759ac7a6b72a3d02814c2bfb26bc4f49204c (diff) | |
download | gn-uploader-7a3a54ec40fac9071a513487602957f8418f163e.tar.gz |
Select the platform (GeneChipId) first
Diffstat (limited to 'qc_app/templates')
-rw-r--r-- | qc_app/templates/parse_results.html | 2 | ||||
-rw-r--r-- | qc_app/templates/select_platform.html | 72 |
2 files changed, 73 insertions, 1 deletions
diff --git a/qc_app/templates/parse_results.html b/qc_app/templates/parse_results.html index 1a224e8..80d6a2d 100644 --- a/qc_app/templates/parse_results.html +++ b/qc_app/templates/parse_results.html @@ -13,7 +13,7 @@ {{errors_display(errors, "No errors found in the file", "We found the following errors")}} {%if errors | length == 0 %} -<form method="post" action="{{url_for('dbinsert.select_dataset')}}"> +<form method="post" action="{{url_for('dbinsert.select_platform')}}"> <input type="hidden" name="job_id" value="{{job_id}}" /> <input type="submit" value="update database" class="btn btn-main" /> </form> diff --git a/qc_app/templates/select_platform.html b/qc_app/templates/select_platform.html new file mode 100644 index 0000000..f8db736 --- /dev/null +++ b/qc_app/templates/select_platform.html @@ -0,0 +1,72 @@ +{%extends "base.html"%} + +{%block title%}Select Dataset{%endblock%} + +{%block contents%} +<h1 class="heading">{{filename}}: select platform</h2> + +<form method="POST" action="{{url_for('dbinsert.select_study')}}" + id="select-platform-form" data-genechips="{{genechips_data}}"> + <input type="hidden" name="filename" value="{{filename}}" /> + <input type="hidden" name="filetype" value="{{filetype}}" /> + + <fieldset> + <label for="species" class="form-col-1">species</label> + <select id="species" name="species" class="form-col-2"> + {%for row in species:%} + <option value="{{row['SpeciesId']}}" + {%if row["Name"] == default_species:%} + selected="selected" + {%endif%}> + {{row["MenuName"]}} + </option> + {%endfor%} + </select> + </fieldset> + + <table id="genechips-table"> + <thead> + <tr> + <th>Select</th> + <th>GeneChip Name</th> + <th>Name</th> + <th>GeoPlatform</th> + <th>GO Tree Value</th> + </tr> + </thead> + + <tbody> + {%for chip in genechips:%} + <tr> + <td> + <input type="radio" name="genechipid" value="{{chip['GeneChipId']}}" + required="required" /> + </td> + <td>{{chip["GeneChipName"]}}</td> + <td>{{chip["Name"]}}</td> + <td>{{chip["GeoPlatform"]}}</td> + <td>{{chip["GO_tree_value"]}}</td> + </tr> + {%else%} + <tr> + <td colspan="5">No chips found for selected species</td> + </tr> + {%endfor%} + </tbody> + </table> + + <fieldset> + <input type="submit" class="btn btn-main form-col-2" + value="submit platform" /> + </fieldset> +</form> +{%endblock%} + +{%block javascript%} +<script type="text/javascript" src="/static/js/utils.js"></script> +<script type="text/javascript" src="/static/js/select_platform.js"></script> +<script type="text/javascript"> + document.getElementById( + "species").addEventListener("change", update_genechips); +</script> +{%endblock%} |