Commit 520673d2 authored by Marc Duez's avatar Marc Duez

server : prefilled add sequence file form

parent 7dabde89
......@@ -17,7 +17,17 @@ def add():
res = {"success" : "false", "message" : "you don't have right to upload files"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
else:
return dict(message=T('add file'))
query = db((db.sequence_file.patient_id==request.vars['id'])).select()
if len(query) != 0 :
pcr = query[0].pcr
sequencer = query[0].sequencer
producer = query[0].producer
else:
pcr = sequencer = producer = ""
return dict(message=T('add file'),
pcr=pcr,
sequencer=sequencer,
producer=producer)
#TODO check data
def add_form():
......
......@@ -37,17 +37,17 @@
</tr>
<tr>
<td><label for="pcr" id="pcr__label">pcr: </label></td>
<td><input class="text" id="pcr" name="pcr" type="text" size="40" value=""></td>
<td><input class="text" id="pcr" name="pcr" type="text" size="40" value="{{=pcr}}"></td>
<td></td>
</tr>
<tr>
<td><label for="sequencer" id="sequencer__label">sequencer: </label></td>
<td><input class="text" id="sequencer" name="sequencer" type="text" size="40" value=""></td>
<td><input class="text" id="sequencer" name="sequencer" type="text" size="40" value="{{=sequencer}}"></td>
<td></td>
</tr>
<tr>
<td><label for="producer" id="producer__label">producer: </label></td>
<td><input class="text" id="producer" name="producer" type="text" size="40" value=""></td>
<td><input class="text" id="producer" name="producer" type="text" size="40" value="{{=producer}}"></td>
<td></td>
</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