-
Notifications
You must be signed in to change notification settings - Fork 0
/
_analytical_standard_form.html.haml
27 lines (25 loc) · 1.15 KB
/
_analytical_standard_form.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
= simple_form_for @analytical_standard do |f|
= f.hidden_field :analytical_method_id, :value => params[:method]
= f.input :user_id, :label => "Prepared by", :collection => users, :as => :select
= f.input :preparation_date, :label => "Preparation date"
= f.input :volume, :as => :string
%p
= f.label :notes
= f.text_area :notes, :rows => 2, :cols => 40
.polaroid-border
.polaroid-block
%h2= "Standard for #{@method.name}"
%table
%tr
%th Analyte
%th Amount(g)
%th Batch
- @method.analytes.each_with_index do |analyte, i|
%tr
%td= analyte.name
/ %bigtext= analyte.name
= hidden_field_tag "analytical_standard[standard_amounts_attributes][#{i}][name]", analyte.name
%td= text_field_tag "analytical_standard[standard_amounts_attributes][#{i}][amount]"
%td= text_field_tag "analytical_standard[standard_amounts_attributes][#{i}][batch]"
.lowbuttons
= f.submit @analytical_standard.new_record? ? 'Log Standard' : 'Update Standard', :disable_with => "Submitting..."