aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/select_dataset.html
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-11-30 09:59:14 +0300
committerFrederick Muriuki Muriithi2023-11-30 09:59:14 +0300
commitad7f0b3cf99ec37be96b819dacd927be86df91ff (patch)
tree75e6bb5459617b09aebd5c3481d039caf97b6b9d /qc_app/templates/select_dataset.html
parent3b725c7354b185cc748f1d8ebfac6bab5e17b4aa (diff)
downloadgn-uploader-ad7f0b3cf99ec37be96b819dacd927be86df91ff.tar.gz
Handle duplicate dataset creation error
Notify the user when they try to create a new dataset that has the same name as an existing dataset and give them the chance to fix it before continuing.
Diffstat (limited to 'qc_app/templates/select_dataset.html')
-rw-r--r--qc_app/templates/select_dataset.html43
1 files changed, 35 insertions, 8 deletions
diff --git a/qc_app/templates/select_dataset.html b/qc_app/templates/select_dataset.html
index a21957d..cad6621 100644
--- a/qc_app/templates/select_dataset.html
+++ b/qc_app/templates/select_dataset.html
@@ -66,7 +66,10 @@
<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']}}">
+ <option value="{{method['AvgMethodId']}}"
+ {%if avgid is defined and method['AvgMethodId'] | int == avgid | int%}
+ selected="selected"
+ {%endif%}>
{{method["Name"]}}
</option>
{%endfor%}
@@ -76,38 +79,60 @@
<fieldset>
<label for="datasetname" class="form-col-1">name:</label>
<input id="datasetname" name="datasetname" type="text"
- class="form-col-2" />
+ class="form-col-2"
+ {%if datasetname is defined %}
+ value="{{datasetname}}"
+ {%endif%} />
</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" />
+ required="required" class="form-col-2"
+ {%if datasetname2 is defined %}
+ value="{{datasetname2}}"
+ {%endif%} />
</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" />
+ required="required" class="form-col-2"
+ {%if datasetfullname is defined %}
+ value="{{datasetfullname}}"
+ {%endif%} />
</fieldset>
<fieldset>
<label for="datasetshortname" class="form-col-1">short name:</label>
<input id="datasetshortname" name="datasetshortname" type="text"
- required="required" class="form-col-2" />
+ required="required" class="form-col-2"
+ {%if datasetshortname is defined %}
+ value="{{datasetshortname}}"
+ {%endif%} />
</fieldset>
<fieldset>
<label for="datasetpublic" class="form-col-1">public:</label>
<input id="datasetpublic" name="datasetpublic" type="number"
- required="required" min="0" max="2" value="0"
+ required="required" min="0" max="2"
+ {%if datasetpublic is defined %}
+ value="{{datasetpublic | int}}"
+ {%else%}
+ value="0"
+ {%endif%}
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"
+ type="number" required="required" min="0" max="2"
+ {%if datasetconfidentiality is defined %}
+ value="{{datasetconfidentiality | int}}"
+ {%else%}
+ value="0"
+ {%endif%}
class="form-col-2" />
</fieldset>
@@ -117,7 +142,9 @@
<option value="">None</option>
{%for dscale in datascales:%}
<option value="{{dscale}}"
- {%if dscale == "log2":%}
+ {%if datasetdatascale is defined and dscale == datasetdatascale%}
+ selected="selected"
+ {%elif dscale == "log2":%}
selected="selected"
{%endif%}>
{{dscale}}