Commit ac002b4c authored by Marc Duez's avatar Marc Duez

server: add edit patient button to sample list

-use better redirection for edit_patient (redirect to previous page instead of patient info)
-use better redirection for schedule_task (reload page instead of patient info)
parent f755b8e1
......@@ -127,7 +127,7 @@ def edit_form():
id_label=request.vars["id_label"]
)
res = {"redirect": "patient/index",
res = {"redirect": "back",
"message": "change saved"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
......
......@@ -49,9 +49,7 @@ def schedule_run(id_sequence, id_config):
config_name = db.config[id_config].name
patient_name = db.patient[id_patient].first_name + " " + db.patient[id_patient].last_name
res = {"redirect": "patient/info",
"args" : { "id" : id_patient,
"config_id" : id_config},
res = {"redirect": "reload",
"message": "default/run_request : request added to run config " + config_name + " on " + filename + " for " + patient_name }
return res
......
......@@ -53,11 +53,11 @@ query = db(
<h3>{{=patient.last_name + " " + patient.first_name }} ({{=patient.birth}})</h3>
<div class="db_block">
<!--
<div class="db_block_left">
file list
<span class="button" onclick="db.call('patient/edit', { 'id' : '{{=request.vars["id"]}}' } )" > edit patient info </span>
</div>
-->
<div class="db_block_right">
config
......
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