diff options
author | Frederick Muriuki Muriithi | 2022-07-14 06:20:44 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-07-19 05:05:38 +0300 |
commit | 8b5400fa04d4ca2e60d7e926800816245e2ab809 (patch) | |
tree | 7c96e72351e7d09b473a32415e71ced4e38b08d7 /qc_app/templates/select_dataset.html | |
parent | e5c3ac00fa68f1180f1f33ba09e9786cf0e9cca5 (diff) | |
download | gn-uploader-8b5400fa04d4ca2e60d7e926800816245e2ab809.tar.gz |
Enable creation of new dataset
Enable the user to create a new dataset should the need arise.
A few extra fixes were done, such as:
- Provide list of average methods to choose from
- Provide input elements for some expected fields
- Add a new confirmation step before doing the actual data update
Diffstat (limited to 'qc_app/templates/select_dataset.html')
-rw-r--r-- | qc_app/templates/select_dataset.html | 82 |
1 files changed, 68 insertions, 14 deletions
diff --git a/qc_app/templates/select_dataset.html b/qc_app/templates/select_dataset.html index 59ead59..a16fc75 100644 --- a/qc_app/templates/select_dataset.html +++ b/qc_app/templates/select_dataset.html @@ -8,10 +8,10 @@ {%endblock%} {%block contents%} -<h1 class="heading">{{filename}}: select dataset</h2> +<h2 class="heading">{{filename}}: select dataset</h2> <div class="two-column-with-separator"> - <form method="POST" action="{{url_for('dbinsert.insert_data')}}" + <form method="POST" action="{{url_for('dbinsert.final_confirmation')}}" id="select-dataset-form" class="two-col-sep-col1"> <legend>choose existing dataset</legend> {{hidden_fields( @@ -19,8 +19,8 @@ studyid=studyid)}} <fieldset> - <label for="dataset" class="form-col-1">dataset:</label> - <select id="dataset" name="dataset" class="form-col-2" + <label for="datasetid" class="form-col-1">dataset:</label> + <select id="datasetid" name="datasetid" class="form-col-2" {%if datasets | length == 0:%} disabled="disabled" {%endif%}> @@ -44,37 +44,91 @@ <p class="two-col-sep-separator">OR</p> <form method="POST" id="create-dataset-form" + action="{{url_for('dbinsert.create_dataset')}}" class="two-col-sep-col2"> <legend>create new dataset</legend> {{hidden_fields( filename, filetype, species=species, genechipid=genechipid, studyid=studyid)}} + {%with messages = get_flashed_messages(with_categories=true)%} + {%if messages:%} + <ul> + {%for category, message in messages:%} + <li class="{{category}}">{{message}}</li> + {%endfor%} + </ul> + {%endif%} + {%endwith%} + <fieldset> - <label for="avgid">average:</label> - <select id="avgid" name="avgid" required="required"> + <label for="avgid" class="form-col-1">average:</label> + <select id="avgid" name="avgid" required="required" class="form-col-2"> <option value="">Select averaging method</option> + {%for method in avgmethods:%} + <option value="{{method['AvgMethodId']}}"> + {{method["Name"]}} + </option> + {%endfor%} </select> </fieldset> <fieldset> - <label for="datasetname">name:</label> - <input id="datasetname" name="datasetname" type="text" /> + <label for="datasetname" class="form-col-1">name:</label> + <input id="datasetname" name="datasetname" type="text" + class="form-col-2" /> + </fieldset> + + <fieldset> + <label for="datasetname2" class="form-col-1">name 2:</label> + <input id="datasetname2" name="datasetname2" type="text" + required="required" class="form-col-2" /> + </fieldset> + + <fieldset> + <label for="datasetfullname" class="form-col-1">full name:</label> + <input id="datasetfullname" name="datasetfullname" type="text" + required="required" class="form-col-2" /> </fieldset> <fieldset> - <label for="datasetname2">name 2:</label> - <input id="datasetname2" name="datasetname2" type="text" /> + <label for="datasetshortname" class="form-col-1">short name:</label> + <input id="datasetshortname" name="datasetshortname" type="text" + required="required" class="form-col-2" /> </fieldset> <fieldset> - <label for="datasetfullname">full name:</label> - <input id="datasetfullname" name="datasetfullname" type="text" /> + <label for="datasetpublic" class="form-col-1">public:</label> + <input id="datasetpublic" name="datasetpublic" type="number" + required="required" min="0" max="2" value="0" + class="form-col-2" /> + </fieldset> + + <fieldset> + <label for="datasetconfidentiality">confidentiality:</label> + <input id="datasetconfidentiality" name="datasetconfidentiality" + type="number" required="required" min="0" max="2" value="0" + class="form-col-2" /> + </fieldset> + + <fieldset> + <label for="datasetdatascale" class="form-col-1">data scale:</label> + <select id="datasetdatascale" name="datasetdatascale" class="form-col-2"> + <option value="">None</option> + {%for dscale in datascales:%} + <option value="{{dscale}}" + {%if dscale == "log2":%} + selected="selected" + {%endif%}> + {{dscale}} + </option> + {%endfor%} + </select> </fieldset> <fieldset> - <label for="datasetshortname">full name:</label> - <input id="datasetshortname" name="datasetshortname" type="text" /> + <input type="submit" value="create new dataset" + class="btn btn-main form-col-2" /> </fieldset> </form> |