Commit b0bd73e4 authored by Ryan Herbert's avatar Ryan Herbert

Revert d0bcec1c

moves the file fields back up to the beginning of the form since the
jstree will not longer cause so much distortion.
parent 3fa4a50e
......@@ -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,6 +14,33 @@
<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:}} style="display: none" {{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" style="display: none">
<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 id="jstree_field_{{=i}}"
class="field_div jstree_field form-control"
{{if not source_module_active:}} style="display: none;" {{pass}}
data-index={{=i}}
onclick="db.display_jstree(this.dataset.index)">
<span class="button2">browse</span>
<span id="file_indicator_{{=i}}"></span>
</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}}"
......@@ -59,31 +86,4 @@
type="text">
</div>
</div>
<div class="field_div">
<div id="file_field_1_{{=i}}" class="field_div file_1" {{if source_module_active:}} style="display: none" {{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" style="display: none">
<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 id="jstree_field_{{=i}}"
class="field_div jstree_field form-control"
{{if not source_module_active:}} style="display: none;" {{pass}}
data-index={{=i}}
onclick="db.display_jstree(this.dataset.index)">
<span class="button2">browse</span>
<span id="file_indicator_{{=i}}"></span>
</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