Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

form.html 4.98 KB
Newer Older
1 2
<fieldset name="file{{=i}}">
    <legend>Sample {{=i+1}}</legend>
3
    <div>
Ryan Herbert's avatar
Ryan Herbert committed
4
        <input type="hidden" id="file_filename_{{=i}}" class="filename" name="file[{{=i}}][filename]" type="text" value="">
5 6 7 8 9
        <input type="hidden" id="file_id_{{=i}}" name="file[{{=i}}][id]"
            value="{{if 'id' in file:}}{{=file['id']}}{{pass}}" >
        <input type="hidden" id="sample_set_id" name="sample_set_id" value="{{if "sample_set_id" in request.vars:}}{{=request.vars["sample_set_id"]}}{{pass}}" >
        <input type="hidden" id="sample_type" name="sample_type" value="{{=sample_type}}" />
    </div>
10 11
    <fieldset name="sequence_file">
        <legend>sequence file(s)</legend>
Ryan Herbert's avatar
Ryan Herbert committed
12 13 14 15 16 17 18 19
        <div id="file_field_1_{{=i}}" class="field_div file_1" {{if source_module_active:}} hidden {{pass}}>
            <label for="file_upload_1_{{=i}}" id="file__label_{{=i}}"> file 1 </label>
            <input class="upload_field form-control" id="file_upload_1_{{=i}}" type="file"
            {{if source_module_active:}}
                disabled
            {{pass}}
                onchange="db.upload_file_onChange('file_filename_{{=i}}', this.value)"
            ><span>* (.fa, .fastq, .fa.gz, .fastq.gz, .clntab)</span>
20
        </div>
Ryan Herbert's avatar
Ryan Herbert committed
21
        <div id="file_2_{{=i}}" class="field_div file_2" hidden>
Ryan Herbert's avatar
Ryan Herbert committed
22 23
            <label for="file_upload_2_{{=i}}" id="file2__label_{{=i}}"> file 2 </label>
            <input class="upload_field form-control" id="file_upload_2_{{=i}}" type="file"
Ryan Herbert's avatar
Ryan Herbert committed
24 25 26 27
            {{if source_module_active:}}
                disabled
            {{pass}}
            ><span>* (.fa, .fastq, .fa.gz, .fastq.gz, .clntab)</span>
28
        </div>
Ryan Herbert's avatar
Ryan Herbert committed
29
        <div class="jstree_container" {{if not source_module_active:}} hidden {{pass}}>
30 31
            selected
            <div id="file_indicator_{{=i}}"></div>
Ryan Herbert's avatar
Ryan Herbert committed
32
            <div class="jstree" id="jstree_loader_{{=i}}"
Ryan Herbert's avatar
Ryan Herbert committed
33 34 35
                {{if not source_module_active:}}
                    hidden
                {{else:}}
Ryan Herbert's avatar
Ryan Herbert committed
36
                    onload="db.set_jstree($('#jstree_{{=i}}'), {{=i}})"
Ryan Herbert's avatar
Ryan Herbert committed
37 38 39 40
                {{pass}}>
                file
                <div id="jstree_{{=i}}" data-index="{{=i}}"></div>
            </div>
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
        </div>
    </fieldset>

    <fieldset>
        <legend>set selection</legend>
        <div>
            You must associate this sample with at least one patient, run or set.<br>You can also associate it with any combination of the three.
        </div>
        <div class="field_div">
            <label for="set_ids_{{=i}}" id="set_ids__label_{{=i}}">sets: </label>
            <div class="token_div form-control" onclick="$('#token_input_{{=i}}').focus()">
                <input
                    hidden
                    id="file_set_list_{{=i}}"
                    name="file[{{=i}}][set_ids]"
                    type="text"
                    value="{{=",".join([set['id'] for set in file['sets']])}}">
                <div id="set_div_{{=i}}" class="token_container">
                    {{ for set in file['sets']: }}
                        <span class="set_token {{=set['type']}}_token" data-set-id="{{=set['id']}}">
                            <i class="icon-cancel" onclick="this.parentNode.parentNode.removeChild(this.parentNode);"></i>
                            {{=set['id'][3:]}}
                        </span>
                    {{pass}}
                </div>
                <input
                    id="token_input_{{=i}}"
                    class="token_input"
                    autocomplete="off"
                    onfocus="new VidjilAutoComplete().setupSamples(this);
                    new Tokeniser().setup(this, document.getElementById('set_div_{{=i}}'), document.getElementById('file_set_list_{{=i}}'));"
                    data-needs-atwho="true"
                    data-needs-tokeniser="true"
                    data-group-ids="{{=group_ids}}"
                    data-keys='["generic", "patient", "run"]'
                    type="text">
            </div>
        </div>
    </fieldset>
    <fieldset>
        <legend>sample information</legend>
        <div class="field_div">
            <label for="sampling_date_{{=i}}" id="sampling_date__label_{{=i}}">sampling date: </label>
            <input class="date form-control" id="sampling_date_{{=i}}" name="file[{{=i}}][sampling_date]" type="text"
                value="{{if 'sampling_date' in file and file['sampling_date'] is not None:}}{{=file['sampling_date']}}{{pass}}"
                placeholder="yyyy-mm-dd" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
        </div>
        <div class="field_div">
            <label for="file_info_{{=i}}" id="file_info__label_{{=i}}">info: </label>
            <textarea id="file_info_{{=i}}"
                onfocus="new VidjilAutoComplete().setupTags(this);"
                data-needs-atwho="true"
                data-keys="{{=group_ids}}"
                class="text form-control"
                name="file[{{=i}}][info]"
                rows="1">{{if 'info' in file and file['info'] is not None:}}{{=file['info']}}{{pass}}</textarea>
        </div>
    </fieldset>
</fieldset>