diff options
author | zsloan | 2019-10-28 11:37:04 -0500 |
---|---|---|
committer | zsloan | 2019-10-28 11:37:04 -0500 |
commit | 9b5796fe87af736e82367e06f4ac22bfb88f4d82 (patch) | |
tree | 59bc3e64ff3cad5d068745363e40353377d21da4 /wqflask | |
parent | ed0051e95ddf0315ae5de08c0c33e9f779e75b32 (diff) | |
download | genenetwork2-9b5796fe87af736e82367e06f4ac22bfb88f4d82.tar.gz |
Now defaults to last used collection and hides the Select Collection field when there are no existing collections
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/collections/add.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/collections/add.html b/wqflask/wqflask/templates/collections/add.html index 37cabdbd..aa5deccb 100644 --- a/wqflask/wqflask/templates/collections/add.html +++ b/wqflask/wqflask/templates/collections/add.html @@ -23,21 +23,27 @@ {% endif %} </div> </fieldset> + {% if collections|length > 0 %} <hr /> <fieldset> <legend>2. Add to an existing collection</legend> <div style="margin-left: 20px;"> <!--<label>Existing collection name:</label>--> <select name="existing_collection" class="form-control"> - <option selected disabled>Select Collection</option> + <!--<option selected disabled>Select Collection</option>--> {% for col in collections %} + {% if loop.index == 1 %} + <option value="{{ col.id }}:{{ col.name }}" selected>{{ col.name }}</option> + {% else %} <option value="{{ col.id }}:{{ col.name }}">{{ col.name }}</option> + {% endif %} {% endfor %} </select> <br /> <button type="submit" name="add_to_existing" class="btn btn-primary">Add to existing collection</button> </div> </fieldset> + {% endif %} </form> </div> </div> |