Skip to content

Commit

Permalink
Merge branch 'hotfix-issue-912' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jorvis committed Oct 16, 2024
2 parents ffb5723 + 35ec634 commit 8849b9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion www/js/upload_dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ const populateMetadataFormFromFile = async () => {
if (data.success) {
document.getElementsByName('metadata-title')[0].value = data.metadata.title.value;
document.getElementsByName('metadata-summary')[0].value = data.metadata.summary.value;
document.getElementsByName('metadata-dataset-type')[0].value = data.metadata.dataset_type.value;
document.getElementsByName('metadata-annotation-source')[0].value = data.metadata.annotation_source.value;
document.getElementsByName('metadata-annotation-version')[0].value = data.metadata.annotation_release_number.value;
document.getElementsByName('metadata-geo-id')[0].value = data.metadata.geo_accession.value;
Expand All @@ -285,6 +284,16 @@ const populateMetadataFormFromFile = async () => {
document.getElementsByName('metadata-library-source')[0].value = data.metadata.library_source.value;
document.getElementsByName('metadata-library-strategy')[0].value = data.metadata.library_strategy.value;
document.getElementsByName('metadata-pubmed-id')[0].value = data.metadata.pubmed_id.value;

// Handle the metadata-dataset-type select box
let dataset_type_select = document.getElementsByName('metadata-dataset-type')[0];
for (let i = 0; i < dataset_type_select.options.length; i++) {
if (dataset_type_select.options[i].value === data.metadata.dataset_type.value) {
dataset_type_select.selectedIndex = i;
break;
}
}

document.getElementById('metadata-upload-status-message').textContent = "Form populated with uploaded metadata";
button.disabled = false;

Expand Down
4 changes: 2 additions & 2 deletions www/upload_dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ <h1>Step - Enter metadata (via form OR upload)</h1>
<div class="select">
<select name="metadata-dataset-type">
<option value="">Select one</option>
<option value="sc-rna-seq">Single-cell RNA-seq</option>
<option value="bulk-rna-seq">Bulk RNA-seq</option>
<option value="single-cell-rnaseq">Single-cell RNA-seq</option>
<option value="bulk-rnaseq">Bulk RNA-seq</option>
<option value="microarray">Microarray</option>
</select>
</div>
Expand Down

0 comments on commit 8849b9e

Please sign in to comment.