about summary refs log tree commit diff
path: root/uploader/templates/populations/create-population.html
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-09-06 16:38:04 -0500
committerFrederick Muriuki Muriithi2024-09-06 16:38:04 -0500
commitb74911f15a9f9a9ff3cca0e25fcd761bf41652b5 (patch)
tree9f17ca43a8da7e7bcaf7a2990f32e5e792d629be /uploader/templates/populations/create-population.html
parente13a694540ee65f401652d9ebdb5f845c15fb97e (diff)
downloadgn-uploader-b74911f15a9f9a9ff3cca0e25fcd761bf41652b5.tar.gz
Add more fields when creating a population
Add more of the missing fields when creating a population, to ensure
that the created population works as expected.
Diffstat (limited to 'uploader/templates/populations/create-population.html')
-rw-r--r--uploader/templates/populations/create-population.html89
1 files changed, 85 insertions, 4 deletions
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html
index 6a96148..12811fd 100644
--- a/uploader/templates/populations/create-population.html
+++ b/uploader/templates/populations/create-population.html
@@ -88,8 +88,7 @@
         <p>
           This is a short representative, but constrained name for your
           population.
-        </p>
-        <p>
+          <br />
           The field will only accept letters ('A-Za-z'), numbers (0-9), hyphens
           and underscores. Any other character will cause the name to be
           rejected.
@@ -97,6 +96,20 @@
       </small>
     </div>
 
+    <div class="form-group">
+      <label for="txt-population-code" class="form-label">Population Code</label>
+      <input type="text"
+             id="txt-population-code"
+             name="population_code"
+             maxLength="5"
+             minLength="3"
+             value="{{error_values.population_code or ''}}"
+             class="form-control" />
+      <small class="form-text text-muted">
+        … document what this field is for …
+      </small>
+    </div>
+
     <div {%if errors.population_description%}
          class="form-group has-error"
          {%else%}
@@ -119,14 +132,82 @@
           This is a more detailed description for your population. This is
           useful to communicate with other researchers some details regarding
           your population, and what its about.
-        </p>
-        <p>
+          <br />
           Put, here, anything that describes your population but does not go
           cleanly under metadata.
         </p>
       </small>
     </div>
 
+    <div {%if errors.population_family%}
+         class="form-group has-error"
+         {%else%}
+         class="form-group"
+         {%endif%}>
+      <label for="select-population-family" class="form-label">Family</label>
+      <select id="select-population-family"
+              name="population_family"
+              class="form-control"
+              required="required">
+        <option value="">Please select a family</option>
+        {%for family in families%}
+        <option value="{{family}}"
+                {%if error_values.population_family == family%}
+                selected="selected"
+                {%endif%}>{{family}}</option>
+        {%endfor%}
+      </select>
+      <small class="form-text text-muted">
+        <p>… provide some documentation on what this field does …</p>
+      </small>
+    </div>
+
+    <div {%if errors.population_mapping_method_id%}
+         class="form-group has-error"
+         {%else%}
+         class="form-group"
+         {%endif%}>
+      <label for="select-population-mapping-methods"
+             class="form-label">Mapping Methods</label>
+
+      <select id="select-population-mapping-methods"
+              name="population_mapping_method_id"
+              class="form-control"
+              required="required">
+        <option value="">Select appropriate mapping methods</option>
+        {%for mmethod in mapping_methods%}
+        <option value="{{mmethod.id}}"
+                {%if error_values.population_mapping_method_id == mmethod.id%}
+                selected="selected"
+                {%endif%}>{{mmethod.value}}</option>
+        {%endfor%}
+      </select>
+
+      <small class="form-text text-muted">
+        <p>Select the mapping methods that your population will support.</p>
+      </small>
+    </div>
+
+    <div {%if errors.population_genetic_type%}
+         class="form-group has-error"
+         {%else%}
+         class="form-group"
+         {%endif%}>
+      <label for="select-population-genetic-type"
+             class="form-label">Genetic Type</label>
+      <select id="select-population-genetic-type"
+              name="population_genetic_type"
+              class="form-control">
+        <option value="">Select proper genetic type</option>
+        {%for gtype in genetic_types%}
+        <option value="{{gtype}}"
+                {%if error_values.population_genetic_type == gtype%}
+                selected="selected"
+                {%endif%}>{{gtype}}</option>
+        {%endfor%}
+      </select>
+    </div>
+
     <div class="form-group">
       <input type="submit"
              value="create population"