form.html 1.41 KB
Newer Older
Ryan Herbert's avatar
Ryan Herbert committed
1
<span class="left form_label">Set {{=i+1}}</span>
Ryan Herbert's avatar
Ryan Herbert committed
2 3 4 5 6 7 8 9 10 11 12 13 14
<input type="hidden" id="generic_id_{{=i}}" name="generic[{{=i}}][id]" value="{{if set is not None:}}{{=set['id']}}{{pass}}">
<input type="hidden" sample_set_id="generic_sample_set_id_{{=i}}" name="generic[{{=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">
    <input id="sample_set_name_{{=i}}" name="generic[{{=i}}][name]" type="text" class="string form-control"
        value="{{if set is not None:}}{{=set['name']}}{{pass}}" required placeholder="Name">
</div>
<div class="field_div">
15
    <input
Ryan Herbert's avatar
Ryan Herbert committed
16 17
        onfocus="$(this).data('group-ids', [$('#group_select option:selected').val()]);
                 new VidjilAutoComplete().setupAtWho(this);"
18
        onkeydown="if (event.keyCode == 13) return false;"
Ryan Herbert's avatar
Ryan Herbert committed
19 20 21 22 23
        data-needs-atwho="true"
        class="text form-control"
        id="sample_set_info_{{=i}}"
        name="generic[{{=i}}][info]"
        rows="1"
24
        placeholder="set information (#tags can be used)"
25
        autocomplete="off"
26
        value="{{if set is not None and set['info'] is not None:}}{{=set['info']}}{{pass}}"/>
Ryan Herbert's avatar
Ryan Herbert committed
27
</div>