Commit e3bdc9fc authored by Mikaël Salson's avatar Mikaël Salson

views/{run,patient}/add.html: Show owner group only when needed

For users having only one group (the huge majority), there
is no need to add fields they won't be able to modify
parent 2e207ceb
......@@ -8,13 +8,15 @@
<td><input class="date" id="patient_id_label" name="id_label" type="text" value=""><span></span></td>
<td></td>
</tr>
<tr class='devel-mode'>
{{ if len(groups) > 1: }}
<tr>
<td><label for="patient_group" id="patient_group__label">Owner Group: </label></td>
<td>
{{= SELECT(*[OPTION(g['name'], _value=g['id']) for g in groups], _name="patient_group", _value=master_group, value=master_group) }}
</td>
<td></td>
</tr>
{{ pass }}
<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=""><span>*</span></td>
......
......@@ -18,13 +18,15 @@
<td><input class="date" id="run_date" name="run_date" type="text" value=""><span>(format: yyyy-mm-dd)</span></td>
<td></td>
</tr>
<tr class='devel-mode'>
{{ if len(groups) > 1: }}
<tr>
<td><label for="run_group" id="run_group__label">Owner Group: </label></td>
<td>
{{= SELECT(*[OPTION(g['name'], _value=g['id']) for g in groups], _name="run_group", _value=master_group, value=master_group) }}
</td>
<td></td>
</tr>
{{ pass }}
<tr>
<td><label for="run_info" id="run_info__label">Info: </label></td>
<td><textarea class="text" cols="60" id="run_info" name="info" rows="10"></textarea></td>
......
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