form.html 2.63 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
    {{ if set is not None and 'error' in set and len(set['error']) > 0: }}
Ryan Herbert's avatar
Ryan Herbert committed
5 6
        <div class="error">error: {{=", ".join(set['error'])}}</div>
    {{ pass }}
Ryan Herbert's avatar
Ryan Herbert committed
7
    <div class="field_div">
8
        <label for="run_id_label_{{=i}}" id="run_id_label__label_{{=i}}">Run ID:</label>
Ryan Herbert's avatar
Ryan Herbert committed
9 10 11
        <input class="date" id="run_id_label_{{=i}}" name="run[{{=i}}][id_label]" type="text"
            value="{{if set is not None and set['id_label'] is not None:}}{{=set['id_label']}}{{pass}}"><span></span>
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
12
    <div class="field_div">
13
        <label for="run_name_{{=i}}" id="run_name__label_{{=i}}">Name:</label>
Ryan Herbert's avatar
Ryan Herbert committed
14
        <input class="string form-control" id="run_name_{{=i}}" name="run[{{=i}}][name]" type="text"
Ryan Herbert's avatar
Ryan Herbert committed
15
            value="{{if set is not None:}}{{=set['name']}}{{pass}}" required>
Ryan Herbert's avatar
Ryan Herbert committed
16
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
17
    <div class="field_div">
18
        <label for="run_date_{{=i}}" id="run_date__label_{{=i}}">Date:</label>
Ryan Herbert's avatar
Ryan Herbert committed
19
        <input id="run_date_{{=i}}" name="run[{{=i}}][run_date]" type="text" class="date form-control"
Ryan Herbert's avatar
Ryan Herbert committed
20
            value="{{if set is not None and set['run_date'] is not None:}}{{=set['run_date']}}{{pass}}"
Ryan Herbert's avatar
Ryan Herbert committed
21
            placeholder="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
22
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
23
    <div class="field_div">
24
        <label for="run_info_{{=i}}" id="run_info__label_{{=i}}">Info:</label>
Ryan Herbert's avatar
Ryan Herbert committed
25 26 27 28
        <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
29
            class="text form-control"
Ryan Herbert's avatar
Ryan Herbert committed
30 31
            id="run_info+{{=i}}"
            name="run[{{=i}}][info]"
Ryan Herbert's avatar
Ryan Herbert committed
32
            rows="1">{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}</textarea>
Ryan Herbert's avatar
Ryan Herbert committed
33
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
34
    <div class="field_div">
35
        <label for="run_sequencer_{{=i}}" id="run_sequencer__label_{{=i}}">Sequencer:</label>
Ryan Herbert's avatar
Ryan Herbert committed
36
        <input id="run_sequencer_{{=i}}" name="run[{{=i}}][sequencer]" type="text" class="form-control"
Ryan Herbert's avatar
Ryan Herbert committed
37 38
            value="{{if set is not None and set['sequencer'] is not None:}}{{=set['sequencer']}}{{pass}}">
    </div>
Ryan Herbert's avatar
Ryan Herbert committed
39
    <div class="field_div">
40
        <label for="run_pcr_{{=i}}" id="pcr__label_{{=i}}">PCR:</label>
Ryan Herbert's avatar
Ryan Herbert committed
41
        <input id="run_pcr_{{=i}}" name="run[{{=i}}][pcr]" type="text" class="form-control"
Ryan Herbert's avatar
Ryan Herbert committed
42 43 44
            value="{{if set is not None and set['pcr'] is not None:}}{{=set['pcr']}}{{pass}}">
    </div>
</fieldset>