28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
<div>
|
|
<%= 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),
|
|
{required: true}, autocomplete: 'off',
|
|
onchange: "var mr_id = $('#measurement_routine_attributes_id').val();
|
|
$.ajax({
|
|
url: '#{measurement_routine_path(id: :mr_id)}'.replace('mr_id', mr_id),
|
|
dataType: 'script'
|
|
});
|
|
return false;" %>
|
|
<%= link_to l(:button_edit), '#',
|
|
onclick: "var mr_id = $('#measurement_routine_attributes_id').val();
|
|
$.ajax({
|
|
url: '#{edit_measurement_routine_path(id: :mr_id)}'.replace('mr_id', mr_id),
|
|
dataType: 'script'
|
|
});
|
|
return false;",
|
|
class: 'icon icon-edit' %>
|
|
</p>
|
|
<% end %>
|
|
<% if routine.description? %>
|
|
<p style='white-space: pre-wrap;' ><%= routine.description %></p>
|
|
<% end %>
|
|
</div>
|