1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/views/measurements/_edit_form.html.erb
cryptogopher 681c0279fb Measurement improvements
Added 'new' action.
Separated js views for new/create/edit.
Displaying taken_at in local time.
Fixed readout destruction on edit.
2019-12-06 21:48:06 +01:00

16 lines
459 B
Plaintext

<%= labelled_form_for @measurement,
url: measurement_path(@measurement),
method: :patch, remote: true,
html: {id: 'measurement-edit-form', name: 'measurement-edit-form'} do |f| %>
<%= render partial: 'measurements/form', locals: {f: f} %>
<div class="tabular">
<p>
<%= submit_tag l(:button_save) %>
<%= link_to l(:button_cancel), "#",
onclick: '$(this).closest("tr").remove(); return false;' %>
</p>
</div>
<% end %>