Commit f6f78cba authored by Marc Duez's avatar Marc Duez

server : add edit form for patient/ sequence file / config / standard file

- add view file for each
- controller function edit and edit_form for each
- add "e" button nead editable data
parent 51821c19
{{
info = db.config[request.vars["id"]]
}}
<form id="data_form" action="DB_ADRESS/config/edit_form" enctype="multipart/form-data" method="post">
<input type="HIDDEN" id="patient_id" name="id" value="{{=request.vars["id"]}}">
<table>
<tbody>
<tr>
<td > <label for="config_name" id="config_name__label"> Name: </label> </td>
<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>
<select id="config_standard" name="config_standard">
{{
query = db(db.standard_file).select()
for row in query :}}
<option value="{{=row.id }}"
{{if row.id==info.standard_id:}}
selected
{{pass}}
>{{=row.name }} </option>
{{pass}}
</select>
</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>
<td> </td>
</tr>
<tr>
<td> <label for="config_info" id="config_info__label">Info: </label> </td>
<td> <textarea class="text" cols="40" id="config_info" name="config_info" rows="10"> {{=info.info}} </textarea> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td > <span class="button" onclick="db.call('config/index')"> back to list </span> <input type="submit" value="Soumettre" class="btn"> </td>
<td> </td>
</tr>
</tbody>
</table>
</form>
{{
info = db.sequence_file[request.vars["id"]]
}}
<form id="data_form" action="DB_ADRESS/file/edit_form" enctype="multipart/form-data" method="post">
<input type="hidden" id="file_id" name="id" value="{{=request.vars["id"]}}" >
<table>
<tbody>
<tr>
<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" value="{{=info.sampling_date}}"> <span>(format: yyyy-mm-dd) /!\ pas encore de check </span> </td>
<td> </td>
</tr>
<tr>
<td> <label for="file_info" id="file_info__label">Info: </label> </td>
<td> <textarea class="text" cols="40" id="file_info" name="file_info" rows="10">{{=info.info}}</textarea> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <span class="button" onclick="db.call('patient/info', { id : '{{=request.vars['patient_id']}}' } )"> back to list </span> <input type="submit" value="Soumettre" class="btn"> </td>
<td> </td>
</tr>
</tbody>
</table>
</form>
{{
info = db.patient[request.vars["id"]]
}}
<form id="data_form" action="DB_ADRESS/patient/edit_form" enctype="multipart/form-data" method="post">
<input type="HIDDEN" id="patient_id" name="id" value="{{=request.vars["id"]}}">
<table>
<tbody>
<tr>
<td > <label for="patient_first_name" id="patient_first_name__label"> First Name: </label> </td>
<td > <input class="string" id="patient_first_name" name="first_name" type="text" value="{{=info.first_name}}"> </td>
<td > </td>
</tr>
<tr>
<td> <label for="patient_last_name" id="patient_last_name__label">Last Name: </label> </td>
<td> <input class="string" id="patient_last_name" name="last_name" type="text" value="{{=info.last_name}}"> </td>
<td> </td>
</tr>
<tr>
<td> <label for="patient_birth" id="patient_birth__label">Birth: </label> <span>(format: yyyy-mm-dd) /!\ pas encore de check </span> </td>
<td> <input class="date" id="patient_birth" name="birth" type="text" value="{{=info.birth}}"> </td>
<td> </td>
</tr>
<tr>
<td> <label for="patient_info" id="patient_info__label">Info: </label> </td>
<td> <textarea class="text" cols="40" id="patient_info" name="info" rows="10"> {{=info.info}} </textarea> </td>
<td></td>
</tr>
<tr>
<td> </td>
<td> <span class="button" onclick="db.call('patient/index')"> back to list </span> <input type="submit" value="Soumettre" class="btn"> </td>
<td> </td>
</tr>
</tbody>
</table>
</form>
{{
info = db.standard_file[request.vars["id"]]
}}
<form id="data_form" action="DB_ADRESS/standard/edit_form" enctype="multipart/form-data" method="post">
<input type="HIDDEN" id="patient_id" name="id" value="{{=request.vars["id"]}}">
<table>
<tbody>
<tr>
<td> <label for="standard_name" id="standard_name__label">Name: </label> </td>
<td> <input class="string" id="standard_name" name="standard_name" rows="10" value="{{=info.name}}"> </td>
<td> </td>
</tr>
<tr>
<td> <label for="standard_info" id="standard_info__label">Info: </label> </td>
<td> <textarea class="text" cols="40" id="standard_info" name="standard_info" rows="10">{{=info.info}}</textarea> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> <span class="button" onclick="db.call('standard/index')"> back to list </span><input type="submit" value="Soumettre" class="btn"> </td>
<td> </td>
</tr>
</tbody>
</table>
</form>
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