29 lines
1.1 KiB
Plaintext
29 lines
1.1 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 %>
|
|
<% unless @routine.description.empty? %>
|
|
<p><%= @routine.description %></p>
|
|
<% end %>
|
|
</div>
|