compute_quantities now returns single hash
Fixed MeasurementsController view management
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="tabular">
|
||||
<%= fields_for 'measurement[routine_attributes]', @routine do |ff| %>
|
||||
<%= fields_for 'measurement[routine_attributes]', routine do |ff| %>
|
||||
<%= ff.hidden_field :id %>
|
||||
<p>
|
||||
<label><%= l(:field_name) %><span class="required"> *</span></label>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<div>
|
||||
<%= fields_for 'measurement[routine_attributes]', @routine do |ff| %>
|
||||
<%= fields_for 'measurement[routine_attributes]', routine do |ff| %>
|
||||
<p>
|
||||
<label><%= l(:field_measurement_routine) %><span class="required"> *</span></label>
|
||||
<%= ff.select :id,
|
||||
options_from_collection_for_select(@project.measurement_routines,
|
||||
:id, :name, @routine.id),
|
||||
options_from_collection_for_select(@project.measurement_routines, :id, :name, routine.id),
|
||||
{required: true}, autocomplete: 'off',
|
||||
onchange: "var mr_id = $('#measurement_routine_attributes_id').val();
|
||||
$.ajax({
|
||||
@@ -22,7 +21,7 @@
|
||||
class: 'icon icon-edit' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% unless @routine.description.empty? %>
|
||||
<p style='white-space: pre-wrap;' ><%= @routine.description %></p>
|
||||
<% unless routine.description.empty? %>
|
||||
<p style='white-space: pre-wrap;' ><%= routine.description %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
$('#measurement-routine-form').html('<%= j render partial: 'measurement_routines/form' %>');
|
||||
$('#measurement-routine-form').html('<%= j render partial: 'measurement_routines/form',
|
||||
locals: {routine: @routine} %>');
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
$('#measurement-routine-form').html('<%= j render partial: 'measurement_routines/show_form' %>');
|
||||
$('#measurement-routine-form').html('<%= j render partial: 'measurement_routines/show_form',
|
||||
locals: {routine: @routine} %>');
|
||||
|
||||
Reference in New Issue
Block a user