Commit 5b526072 authored by Marc Duez's avatar Marc Duez

server : unactive standard

- standard not needed anymore to create a config
- standard link removed form layout
- standard info removed from config list
parent 53513d59
......@@ -38,8 +38,6 @@ def add_form():
error += "name needed, "
if request.vars['config_info'] == "" :
error += "info needed, "
if request.vars['config_standard'] == "" :
error += "standard needed, "
if request.vars['config_command'] == "" :
error += "command needed, "
......@@ -47,7 +45,6 @@ def add_form():
db.config.insert(name=request.vars['config_name'],
info=request.vars['config_info'],
standard_id=request.vars['config_standard'],
command=request.vars['config_command'],
)
......@@ -80,8 +77,6 @@ def edit_form():
error += "name needed, "
if request.vars['config_info'] == "" :
error += "info needed, "
if request.vars['config_standard'] == "" :
error += "standard needed, "
if request.vars['config_command'] == "" :
error += "command needed, "
......@@ -89,11 +84,11 @@ def edit_form():
db.config[request.vars["id"]] = dict(name=request.vars['config_name'],
info=request.vars['config_info'],
standard_id=request.vars['config_standard'],
command=request.vars['config_command'],
)
res = {"success": "true" }
res = {"redirect": "config/index",
"message": "config saved"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
else :
......@@ -120,5 +115,6 @@ def delete():
#delete config
db(db.config.id==request.vars["id"]).delete()
res = {"success": "true" }
res = {"redirect": "config/index",
"message": "config deleted"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
......@@ -115,7 +115,6 @@ db.define_table('standard_file',
db.define_table('config',
Field('standard_id', 'reference standard_file'),
Field('name', 'string'),
Field('command', 'string'),
Field('info','text'))
......
......@@ -13,6 +13,7 @@
<td >
</td>
</tr>
<!--
<tr>
<td>
<label for="config_standard" id="config_standard__label"> standard: </label>
......@@ -29,6 +30,7 @@
<td>
</td>
</tr>
-->
<tr>
<td>
<label for="config_command" id="config_command__label">Command: </label>
......
......@@ -13,6 +13,7 @@ info = db.config[request.vars["id"]]
<td > <input class="string" id="config_name" name="config_name" type="text" value="{{=info.name}}"> </td> <td >
</td>
</tr>
<!--
<tr>
<td> <label for="config_standard" id="config_standard__label"> standard: </label> </td>
<td>
......@@ -30,6 +31,7 @@ info = db.config[request.vars["id"]]
</td>
<td> </td>
</tr>
-->
<tr>
<td> <label for="config_command" id="config_command__label">Command: </label> </td>
<td> <input class="string" id="config_command" name="config_command" type="text" value="{{=info.command}}"> </td>
......
......@@ -10,7 +10,6 @@
<table class="db_table" id="table">
<thead>
<tr><td class="column2"> name </td>
<td class="column2"> standard </td>
<td> info </td>
<td> command </td>
<td class="column5"> </td>
......@@ -20,15 +19,14 @@
{{
query = None
c_id = ""
query = db(db.config.standard_id==db.standard_file.id).select()
query = db(db.config).select()
for row in query :}}
<tr>
<td> {{=row.config.name }} </td>
<td> {{=row.standard_file.name}} </td>
<td> {{=row.config.info }} </td>
<td> {{=row.config.command }} </td>
<td onclick="db.call('config/edit', {'id' :'{{=row.config.id}}'} )" > e </td>
<td onclick="db.call('config/confirm', {'id' :'{{=row.config.id}}'} )" > X </td>
<td> {{=row.name }} </td>
<td> {{=row.info }} </td>
<td> {{=row.command }} </td>
<td onclick="db.call('config/edit', {'id' :'{{=row.id}}'} )" > e </td>
<td onclick="db.call('config/confirm', {'id' :'{{=row.id}}'} )" > X </td>
</tr>
{{pass}}
</table>
......
......@@ -2,7 +2,6 @@
<div id="db_menu">
<a class="button" onclick="db.call('patient/index');">patients</a>
<a class="button" onclick="db.call('standard/index');">standards</a>
<a class="button" onclick="db.call('config/index');">configs</a>
- - -
<a class="button" onclick="db.call('group/index');">groups</a>
......
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