Commit c0ef9cbe authored by Ryan Herbert's avatar Ryan Herbert
Browse files

more consistent hidden fields

ensures that we always use the hidden attribute rather than "display:
none" or a mix of both. The reason being is that setting an element to
"display: none" will not allow it to be displayed by removing the hidden

we have a css rule that applies "display: none" to elements that have
the 'hidden' attribute.

JQuery methods hide() and show() add and remove 'display: none'
respectively so we need to steer clear of these methods since they will
interfere with the behaviour of the 'hidden' attribute and the
associated CSS.
parent 365d954f
......@@ -338,10 +338,10 @@ Database.prototype = {
var option = field.options[i];
if (value == option.value){
if (option.getAttribute("required_files") == "1"){
$(".file_2").attr('hidden', true);
$(".file_2").attr('hidden', false);
......@@ -328,7 +328,6 @@ FileFormBuilder.prototype.build_jstree = function() {
d.className += " jstree_container";
if (!this.source) {
d.hidden = true; = 'none';
var sel = document.createTextNode('selected');
......@@ -18,7 +18,7 @@
onchange="db.upload_file_onChange('file_filename_{{=i}}', this.value)"
><span>* (.fa, .fastq, .fa.gz, .fastq.gz, .clntab)</span>
<div id="file_2_{{=i}}" class="field_div file_2" {{if source_module_active:}} hidden {{pass}}>
<div id="file_2_{{=i}}" class="field_div file_2" hidden>
<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"
{{if source_module_active:}}
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