form.html 2.43 KB
Newer Older
Ryan Herbert's avatar
Ryan Herbert committed
1 2 3
<fieldset name="run{{=i}}">
    <legend>Run {{=i+1}}</legend>
    <input type="hidden" id="run_id_{{=i}}" name="run[{{=i}}][id]" value="{{if set is not None:}}{{=set['id']}}{{pass}}">
4
    <input type="hidden" sample_set_id="run_sample_set_id_{{=i}}" name="run[{{=i}}][sample_set_id]" value="{{if set is not None:}}{{=set['sample_set_id']}}{{pass}}">
5
    {{ if set is not None and 'error' in set and len(set['error']) > 0: }}
Ryan Herbert's avatar
Ryan Herbert committed
6 7
        <div class="error">error: {{=", ".join(set['error'])}}</div>
    {{ pass }}
Ryan Herbert's avatar
Ryan Herbert committed
8
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
9
        <input class="date" id="run_id_label_{{=i}}" name="run[{{=i}}][id_label]" type="text"
10
            value="{{if set is not None and set['id_label'] is not None:}}{{=set['id_label']}}{{pass}}" placeholder="Run ID"><span></span>
Ryan Herbert's avatar
Ryan Herbert committed
11
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
12
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
13
        <input class="string form-control" id="run_name_{{=i}}" name="run[{{=i}}][name]" type="text"
14
            value="{{if set is not None:}}{{=set['name']}}{{pass}}" required placeholder="Name">
Ryan Herbert's avatar
Ryan Herbert committed
15
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
16
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
17
        <input id="run_date_{{=i}}" name="run[{{=i}}][run_date]" type="text" class="date form-control"
Ryan Herbert's avatar
Ryan Herbert committed
18
            value="{{if set is not None and set['run_date'] is not None:}}{{=set['run_date']}}{{pass}}"
19
            placeholder="Date (yyyy-mm-dd)" title="yyyy-mm-dd" 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))">
Ryan Herbert's avatar
Ryan Herbert committed
20
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
21
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
22 23 24 25
        <textarea
            onfocus="$(this).data('group-ids', [$('#group_select option:selected').val()]);
                     new VidjilAutoComplete().setupAtWho(this);"
            data-needs-atwho="true"
Ryan Herbert's avatar
Ryan Herbert committed
26
            class="text form-control"
27
            id="run_info_{{=i}}"
Ryan Herbert's avatar
Ryan Herbert committed
28
            name="run[{{=i}}][info]"
29 30
            rows="1"
            placeholder="Info">{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}</textarea>
Ryan Herbert's avatar
Ryan Herbert committed
31
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
32
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
33
        <input id="run_sequencer_{{=i}}" name="run[{{=i}}][sequencer]" type="text" class="form-control"
34
            value="{{if set is not None and set['sequencer'] is not None:}}{{=set['sequencer']}}{{pass}}" placeholder="Sequencer">
Ryan Herbert's avatar
Ryan Herbert committed
35
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
36
    <div class="field_div">
Ryan Herbert's avatar
Ryan Herbert committed
37
        <input id="run_pcr_{{=i}}" name="run[{{=i}}][pcr]" type="text" class="form-control"
38
            value="{{if set is not None and set['pcr'] is not None:}}{{=set['pcr']}}{{pass}}" placeholder="PCR">
Ryan Herbert's avatar
Ryan Herbert committed
39 40
    </div>
</fieldset>