Commit 0c927a5d authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team

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

Fix e3bdc9fc.
The field must still appear in the form for the value
to be sent to the server. Now the field is just hidden.

Thanks to @RyanHerb for pointing out that issue.
parent 0fd2697e
......@@ -8,15 +8,13 @@
<td><input class="date" id="patient_id_label" name="id_label" type="text" value=""><span></span></td>
<td></td>
</tr>
{{ if len(groups) > 1: }}
<tr>
<tr {{ if len(groups) <= 1: }} class="hiddenCheckBox" {{pass}}>
<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,15 +18,13 @@
<td><input class="date" id="run_date" name="run_date" type="text" value=""><span>(format: yyyy-mm-dd)</span></td>
<td></td>
</tr>
{{ if len(groups) > 1: }}
<tr>
<tr {{ if len(groups) <= 1: }} class="hiddenCheckBox" {{pass}}>
<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