form.html 2.55 KB
Newer Older
Ryan Herbert's avatar
Ryan Herbert committed
1
<span class="left form_label">Run {{=i+1}}</span>
Ryan Herbert's avatar
Ryan Herbert committed
2 3 4 5 6 7 8 9 10
<input type="hidden" id="run_id_{{=i}}" name="run[{{=i}}][id]" value="{{if set is not None:}}{{=set['id']}}{{pass}}">
<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}}">
{{ 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 12
    <input class="stringid form-control" 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}}" placeholder="run ID"><span></span>
Ryan Herbert's avatar
Ryan Herbert committed
13 14 15
</div>
<div class="field_div">
    <input class="string form-control" id="run_name_{{=i}}" name="run[{{=i}}][name]" type="text"
16
        value="{{if set is not None:}}{{=set['name']}}{{pass}}" required placeholder="run name">
Ryan Herbert's avatar
Ryan Herbert committed
17 18 19 20
</div>
<div class="field_div">
    <input id="run_date_{{=i}}" name="run[{{=i}}][run_date]" type="text" class="date form-control"
        value="{{if set is not None and set['run_date'] is not None:}}{{=set['run_date']}}{{pass}}"
21
        placeholder="yyyy-mm-dd" title="run 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))">
Ryan Herbert's avatar
Ryan Herbert committed
22 23
</div>
<div class="field_div">
24
    <input
25
        onfocus="$(this).data('keys', [$('#group_select option:selected').val()]);
26
                 new VidjilAutoComplete().setupTags(this);"
27
        onkeydown="if (event.keyCode == 13) return false;"
Ryan Herbert's avatar
Ryan Herbert committed
28 29 30 31 32
        data-needs-atwho="true"
        class="text form-control"
        id="run_info_{{=i}}"
        name="run[{{=i}}][info]"
        rows="1"
33
        placeholder="run information (#tags can be used)"
34
        autocomplete="off"
35
        value="{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}"/>
Ryan Herbert's avatar
Ryan Herbert committed
36 37
</div>
<div class="field_div">
38 39
    <input id="run_sequencer_{{=i}}" name="run[{{=i}}][sequencer]" type="text" class="form-control sequencer"
        value="{{if set is not None and set['sequencer'] is not None:}}{{=set['sequencer']}}{{pass}}" placeholder="sequencer">
Ryan Herbert's avatar
Ryan Herbert committed
40 41
</div>
<div class="field_div">
42 43
    <input id="run_pcr_{{=i}}" name="run[{{=i}}][pcr]" type="text" class="form-control pcr"
        value="{{if set is not None and set['pcr'] is not None:}}{{=set['pcr']}}{{pass}}" placeholder="primers, capture...">
Ryan Herbert's avatar
Ryan Herbert committed
44
</div>
45