From 5e96d27f3d96c84fc5a15d7040843b379b701d20 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 12 Jun 2024 12:48:56 -0500 Subject: Make URI and UI correspond to each other. Formerly, the URI and UI were not corresponding to each other, e.g. the URI /upload/samples/select_species would display the UI for selecting/creating the population. This was very confusing. This commit fixes that. The commit also adds in user input validation to catch input errors. --- qc_app/templates/index.html | 19 +++------------- qc_app/templates/samples/select-population.html | 6 +++-- qc_app/templates/samples/select-species.html | 29 +++++++++++++++++++++++++ qc_app/templates/samples/upload-samples.html | 6 +++-- 4 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 qc_app/templates/samples/select-species.html (limited to 'qc_app/templates') diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html index 588133a..6e98849 100644 --- a/qc_app/templates/index.html +++ b/qc_app/templates/index.html @@ -114,22 +114,9 @@

This section gives you the opportunity to upload any missing samples

-
- upload samples -
- - -
- -
- -
-
+ + upload Samples/Cases {%endblock%} diff --git a/qc_app/templates/samples/select-population.html b/qc_app/templates/samples/select-population.html index 24decb4..4bb4cc1 100644 --- a/qc_app/templates/samples/select-population.html +++ b/qc_app/templates/samples/select-population.html @@ -15,7 +15,8 @@
-
+ select grouping/population {{flash_messages("error-select-population")}} @@ -43,7 +44,8 @@

OR

- + create new grouping/population {{flash_messages("error-create-population")}} diff --git a/qc_app/templates/samples/select-species.html b/qc_app/templates/samples/select-species.html new file mode 100644 index 0000000..6aa4781 --- /dev/null +++ b/qc_app/templates/samples/select-species.html @@ -0,0 +1,29 @@ +{%extends "base.html"%} +{%from "flash_messages.html" import flash_all_messages%} + +{%block title%}Select Grouping/Population{%endblock%} + +{%block contents%} +

upload samples/cases

+ +

We need to know what species your data belongs to.

+ +{{flash_all_messages()}} + + + upload samples +
+ + +
+ +
+ +
+
+{%endblock%} diff --git a/qc_app/templates/samples/upload-samples.html b/qc_app/templates/samples/upload-samples.html index 5d1ec4c..d04df61 100644 --- a/qc_app/templates/samples/upload-samples.html +++ b/qc_app/templates/samples/upload-samples.html @@ -40,7 +40,9 @@
upload samples
@@ -69,7 +71,7 @@ name="separator" required="required" class="form-col-2"> - + -- cgit v1.2.3