Commit b694a066 authored by Ryan Herbert's avatar Ryan Herbert

file form field upload field at end of form

They're going to expand and move things around a fair amount so putting
them on the right should make the form easier to use.

See #3046
parent fb07e291
......@@ -261,10 +261,10 @@ FileFormBuilder.prototype.build = function(index) {
var div = this.build_div('sample');
div.appendChild(this.createCloseButton());
div.appendChild(this.build_hidden_fields());
div.appendChild(this.build_file_div());
div.appendChild(this.build_date('sampling_date', 'file'));
div.appendChild(this.build_info('file', this.group_ids));
div.appendChild(this.build_set_div());
div.appendChild(this.build_file_div());
return div;
}
......
......@@ -14,38 +14,6 @@
<input type="hidden" id="sample_type" name="sample_type" value="{{=sample_type}}" />
</div>
<div class="field_div">
<div id="file_field_1_{{=i}}" class="field_div file_1" {{if source_module_active:}} hidden {{pass}}>
<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)"
title="(.fa, .fastq, .fa.gz, .fastq.gz, .clntab)"
>
</div>
<div id="file_2_{{=i}}" class="field_div file_2" hidden>
<input class="upload_field form-control" id="file_upload_2_{{=i}}" type="file"
{{if source_module_active:}}
disabled
{{pass}}
title="(.fa, .fastq, .fa.gz, .fastq.gz, .clntab)"
>
</div>
<div class="jstree_container" {{if not source_module_active:}} hidden {{pass}}>
selected:
<span id="file_indicator_{{=i}}"></span>
<div class="jstree" id="jstree_loader_{{=i}}"
{{if not source_module_active:}}
hidden
{{else:}}
onload="db.set_jstree($('#jstree_{{=i}}'), {{=i}})"
{{pass}}>
file
<div id="jstree_{{=i}}" class="inline" data-index="{{=i}}"></div>
</div>
</div>
</div>
<div class="field_div">
<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}}"
......@@ -91,4 +59,36 @@
type="text">
</div>
</div>
<div class="field_div">
<div id="file_field_1_{{=i}}" class="field_div file_1" {{if source_module_active:}} hidden {{pass}}>
<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)"
title="(.fa, .fastq, .fa.gz, .fastq.gz, .clntab)"
>
</div>
<div id="file_2_{{=i}}" class="field_div file_2" hidden>
<input class="upload_field form-control" id="file_upload_2_{{=i}}" type="file"
{{if source_module_active:}}
disabled
{{pass}}
title="(.fa, .fastq, .fa.gz, .fastq.gz, .clntab)"
>
</div>
<div class="jstree_container" {{if not source_module_active:}} hidden {{pass}}>
selected:
<span id="file_indicator_{{=i}}"></span>
<div class="jstree" id="jstree_loader_{{=i}}"
{{if not source_module_active:}}
hidden
{{else:}}
onload="db.set_jstree($('#jstree_{{=i}}'), {{=i}})"
{{pass}}>
file
<div id="jstree_{{=i}}" class="inline" data-index="{{=i}}"></div>
</div>
</div>
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment