Commit 48dab1b2 authored by Ryan Herbert's avatar Ryan Herbert

file* set network file source as default if available

parent 1d00c378
......@@ -118,6 +118,7 @@ def add():
run = run_date+name+id
source_module_active = hasattr(defs, 'FILE_SOURCE') and hasattr(defs, 'FILE_TYPES')
return dict(message = T('add file'),
generic_list = generic_list,
patient_list = patient_list,
......@@ -126,7 +127,8 @@ def add():
generic = generic,
patient = patient,
sample_type = sample_set.sample_type,
run = run)
run = run,
source_module_active = source_module_active)
def manage_filename(filename):
filepath = ""
......@@ -8,20 +8,22 @@
<input type="hidden" id="sample_type" name="sample_type" value="{{=sample_type}}" />
{{ if source_module_active: }}
<tr class='db_table_split' ><td colspan="2"> file source </td></tr>
<td>file source</td>
<label for="file_source_computer">my computer</label>
<input type="radio" id="file_source_computer" name="file_source" value="computer" onchange="db.toggle_file_source()" checked="checked"/>
<label for="file_source_nfs">network</label>
<input type="radio" id="file_source_nfs" name="file_source" value="nfs" onchange="db.toggle_file_source()"/>
<input type="radio" id="file_source_nfs" name="file_source" value="nfs" onchange="db.toggle_file_source()" checked="checked"/>
<label for="file_source_computer">my computer</label>
<input type="radio" id="file_source_computer" name="file_source" value="computer" onchange="db.toggle_file_source()"/>
<tr class='db_table_split' ><td colspan="2"> sequence file(s) </td></tr>
<tr {{if source_module_active:}} hidden {{pass}}>
<td><label for="pre_process" id="pre_process__label">pre-process scenario: </label></td>
<td><select id="pre_process" name="pre_process" onChange="db.pre_process_onChange()">
<td><select id="pre_process" name="pre_process" onChange="db.pre_process_onChange()" {{if source_module_active:}} disabled {{pass}}>
<option required_files="1" value="0">no pre-process (1 file)</option>
{{for row in pre_process_list :}}
<option title="{{=row["info"]}}" required_files="{{=row["file"]}}" value="{{=row["id"]}}">
......@@ -31,17 +33,17 @@
<tr id="file_field">
<tr id="file_field" {{if source_module_active:}} hidden {{pass}}>
<td ><label for="file" id="file__label"> file 1 </label></td>
<td ><input class="upload_field" id="upload_file" type="file"></td>
<td ><input class="upload_field" id="upload_file" type="file" {{if source_module_active:}} disabled {{pass}}></td>
<td >* (.fa, .fastq, .fa.gz, .fastq.gz, .clntab) </td>
<tr id="file2_field" >
<td><label for="file2" id="file2__label"> file 2 </label></td>
<td><input class="upload_field" id="upload_file2" type="file" ></td>
<td><input class="upload_field" id="upload_file2" type="file" {{if source_module_active:}} disabled {{pass}}></td>
<td>* (.fa, .fastq, .fa.gz, .fastq.gz, .clntab) </td>
<tr hidden>
<tr {{if not source_module_active:}} hidden {{else:}} onmouseover="db.set_jstree($('#jstree'))" {{pass}}>
<td >file</td>
<td><div id="jstree"></div></td>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment