Commit 9b3e08e6 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud

file/edit.html: Do not display sampling date when None

Otherwise the displayed date is ``None'' and when the user validates the form
she has an error message stating that the date is under the wrong format.
parent cd623a18
...@@ -64,7 +64,7 @@ info = db.sequence_file[request.vars["id"]] ...@@ -64,7 +64,7 @@ info = db.sequence_file[request.vars["id"]]
<tr class='db_table_split' ><td colspan="2"> sample information </td></tr> <tr class='db_table_split' ><td colspan="2"> sample information </td></tr>
<tr> <tr>
<td><label for="sampling_date" id="sampling_date__label">sampling date: </label></td> <td><label for="sampling_date" id="sampling_date__label">sampling date: </label></td>
<td><input class="date" id="sampling_date" name="sampling_date" type="text" size="20" value="{{=file.sampling_date}}"></td> <td><input class="date" id="sampling_date" name="sampling_date" type="text" size="20" value="{{if file.sampling_date is not None}}{{=file.sampling_date}}{{pass}}"></td>
<td>(format: yyyy-mm-dd)</td> <td>(format: yyyy-mm-dd)</td>
</tr> </tr>
<tr> <tr>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment