|
37 | 37 | = f.number_field :volume, min: 0, step: :any, :class => "input-small", readonly: !@can_update
|
38 | 38 | .span.unit (μl)
|
39 | 39 |
|
40 |
| - = f.form_field :reference_gene do |
41 |
| - = autocomplete_field(f, "batch[reference_gene]", :reference_gene, @navigation_context.institution, class: "input-x-large") |
42 |
| - |
43 |
| - = f.form_field :target_organism_taxonomy_id do |
44 |
| - = autocomplete_field(f, "batch[target_organism_taxonomy_id]", :target_organism_taxonomy_id, @navigation_context.institution, class: "input-x-large") |
45 |
| - |
46 |
| - = f.form_field :pango_lineage do |
47 |
| - = autocomplete_field(f, "batch[pango_lineage]", :pango_lineage, @navigation_context.institution, class: "input-x-large") |
48 |
| - |
49 |
| - = f.form_field :who_label do |
50 |
| - = autocomplete_field(f, "batch[who_label]", :who_label, @navigation_context.institution, class: "input-x-large") |
51 |
| - |
| 40 | + :ruby |
| 41 | + field_names = [ |
| 42 | + 'virus_shortname', |
| 43 | + 'reference_gene', |
| 44 | + 'target_organism_taxonomy_id', |
| 45 | + 'target_organism_name', |
| 46 | + 'pango_lineage', |
| 47 | + 'who_label', |
| 48 | + 'gisaid_id', |
| 49 | + 'gisaid_clade', |
| 50 | + 'nucleotide_db_id', |
| 51 | + 'virus_sample_source', |
| 52 | + 'virus_sample_source_url', |
| 53 | + 'virus_source', |
| 54 | + 'virus_location', |
| 55 | + 'virus_sample_type', |
| 56 | + 'virus_sample_formulation', |
| 57 | + 'virus_sample_concentration', |
| 58 | + 'virus_sample_concentration_unit', |
| 59 | + 'virus_sample_genome_equivalents', |
| 60 | + 'virus_sample_genome_equivalents_unit', |
| 61 | + 'virus_sample_genome_equivalents_reference_gene', |
| 62 | + 'virus_preinactivation_tcid50', |
| 63 | + 'virus_preinactivation_tcid50_unit', |
| 64 | + 'virus_sample_grow_cell_line' |
| 65 | + ] |
| 66 | + - field_names.each do |field| |
| 67 | + = f.form_field field.to_sym do |
| 68 | + = autocomplete_field(f, "batch[#{field}]", field.to_sym, @navigation_context.institution, class: "input-x-large") |
| 69 | + |
52 | 70 | - if @can_edit_sample_quantity
|
53 | 71 | = f.form_field :samples_quantity do
|
54 | 72 | = f.number_field :samples_quantity, min: 0, :class => "input-small"
|
|
0 commit comments