form.html 2.21 KB
Newer Older
Ryan Herbert's avatar
Ryan Herbert committed
1
<span class="left form_label">Patient {{=i+1}}</span>
Ryan Herbert's avatar
Ryan Herbert committed
2 3 4 5 6 7 8 9 10
<input type="hidden" id="patient_id_{{=i}}" name="patient[{{=i}}][id]" value="{{if set is not None:}}{{=set['id']}}{{pass}}">
<input type="hidden" sample_set_id="patient_sample_set_id_{{=i}}" name="patient[{{=i}}][sample_set_id]" value="{{if set is not None:}}{{=set['sample_set_id']}}{{pass}}">
{{ if set is not None and 'error' in set and len(set['error']) > 0: }}
    <div class="error">error: {{=", ".join(set['error'])}}</div>
{{ pass }}
{{ if set is not None and 'message' in set and len(set['message']) > 0: }}
    <div>{{=", ".join(set['message'])}}</div>
{{ pass }}
<div class="field_div">
11
    <input class="form-control" id="patient_id_label_{{=i}}" name="patient[{{=i}}][id_label]" type="text"
Ryan Herbert's avatar
Ryan Herbert committed
12 13 14 15 16 17 18 19 20 21 22 23 24
        value="{{if set is not None and set['id_label'] is not None:}}{{=set['id_label']}}{{pass}}" placeholder="Patient ID">
</div>
<div class="field_div">
    <input class="string form-control" id="patient_first_name_{{=i}}" name="patient[{{=i}}][first_name]" type="text"
        value="{{if set is not None:}}{{=set['first_name']}}{{pass}}" required placeholder="First Name">
</div>
<div class="field_div">
    <input class="string form-control" id="patient_last_name_{{=i}}" name="patient[{{=i}}][last_name]" type="text"
        value="{{if set is not None:}}{{=set['last_name']}}{{pass}}" required placeholder="Last Name">
</div>
<div class="field_div">
    <input class="date form-control" id="patient_birth_{{=i}}" name="patient[{{=i}}][birth]" type="text"
        value="{{if set is not None and set['birth'] is not None:}}{{=set['birth']}}{{pass}}"
25
        title="birth date" pattern="(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))" placeholder="yyyy-mm-dd">
Ryan Herbert's avatar
Ryan Herbert committed
26 27 28 29 30 31 32 33 34 35 36 37
</div>
<div class="field_div">
    <textarea
        onfocus="$(this).data('keys', [$('#group_select option:selected').val()]);
                 new VidjilAutoComplete().setupTags(this);"
        data-needs-atwho="true"
        class="text form-control"
        id="patient_info_{{=i}}"
        name="patient[{{=i}}][info]"
        rows="1"
        placeholder="Info">{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}</textarea>
</div>