about summary refs log tree commit diff
path: root/uploader/templates/populations/create-population.html
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/populations/create-population.html')
-rw-r--r--uploader/templates/populations/create-population.html71
1 files changed, 40 insertions, 31 deletions
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html
index b05ce37..d5359f5 100644
--- a/uploader/templates/populations/create-population.html
+++ b/uploader/templates/populations/create-population.html
@@ -1,20 +1,16 @@
 {%extends "populations/base.html"%}
 {%from "flash_messages.html" import flash_all_messages%}
-{%from "species/macro-select-species.html" import select_species_form%}
-{%from "species/macro-display-species-card.html" import display_species_card%}
 
 {%block title%}Create Population{%endblock%}
 
 {%block pagetitle%}Create Population{%endblock%}
 
-{%block lvl3_breadcrumbs%}
-<li {%if activelink=="create-population"%}
-    class="breadcrumb-item active"
-    {%else%}
-    class="breadcrumb-item"
-    {%endif%}>
+{%block breadcrumbs%}
+{{super()}}
+<li class="breadcrumb-item">
   <a href="{{url_for('species.populations.create_population',
-           species_id=species.SpeciesId)}}">create population</a>
+           species_id=species['SpeciesId'])}}">
+    create population</a>
 </li>
 {%endblock%}
 
@@ -37,12 +33,15 @@
 <div class="row">
   <form method="POST"
         action="{{url_for('species.populations.create_population',
-                species_id=species.SpeciesId)}}">
+                species_id=species.SpeciesId,
+                return_to=return_to)}}">
 
     <legend>Create Population</legend>
 
     {{flash_all_messages()}}
 
+    <input type="hidden" name="return_to" value="{{return_to}}">
+
     <div {%if errors.population_fullname%}
          class="form-group has-error"
          {%else%}
@@ -107,9 +106,12 @@
              value="{{error_values.population_code or ''}}"
              class="form-control" />
       <small class="form-text text-muted">
-        <p class="text-danger">
-          <span class="glyphicon glyphicon-exclamation-sign"></span>
-          What is this field is for? Confirm with Arthur and the rest.
+        <p class="form-text text-muted">
+          This is a 3-character code for your population, that is prepended to
+          the phenotype identifiers. e.g. For the "BXD Family" population, the
+          code is "BXD" and therefore, the phenotype identifiers for the
+          population look like the following examples: <em>BXD_10148</em>,
+          <em>BXD_10180</em>, <em>BXD_10197</em>, etc.
         </p>
       </small>
     </div>
@@ -148,24 +150,35 @@
          {%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>
+      <label for="txt-population-family" class="form-label">Family</label>
+      <input type="text"
+             id="txt-population-family"
+             name="population_family"
+             class="form-control"
+             list="families-list" />
+      <datalist id="families-list">
         {%for family in families%}
-        <option value="{{family}}"
-                {%if error_values.population_family == family%}
-                selected="selected"
-                {%endif%}>{{family}}</option>
+        <option value="{{family}}">{{family}}</option>
         {%endfor%}
-      </select>
+      </datalist>
       <small class="form-text text-muted">
         <p>
-          This is a rough grouping of the populations in GeneNetwork into lists
-          of common types of populations.
-        </p>
+          This is <strong>optional</strong> metadata. It is used to group
+          populations into "families" for presentation in the menus.
+          {%if families | length > 0%}
+          Examples of currently existing families are:
+          <ul>
+            {%for family in families[0:7]%}
+            <li>{{family}}</li>
+            {%endfor%}
+            <li>etc.</li>
+          </ul>
+          {%endif%}
+
+          You can
+          {%if families|length>0%} select from existing families, or {%endif%}
+          create a new family by typing in the input box above. You can also
+          leave the family blank.</p>
       </small>
     </div>
 
@@ -246,7 +259,3 @@
   </form>
 </div>
 {%endblock%}
-
-{%block sidebarcontents%}
-{{display_species_card(species)}}
-{%endblock%}