Files
fixin.me/app/views/measurements/_form.html.erb

25 lines
1004 B
Plaintext

<%= tabular_form_with model: Measurement.new do |form| %>
<fieldset>
<table class="items centered">
<tbody id="readouts">
<tr id="readouts_form">
<td colspan="4">
<%= collection_select :quantity, :id, @quantities, :id, :to_s_with_depth,
{prompt: t('.select_quantity'), disabled: '', selected: ''},
{name: :id, class: 'quantity vexpand',
onchange: "this.form.requestSubmit(new_readout_submit);"} %>
<%= form.submit id: :new_readout_submit, name: nil, value: nil,
formaction: new_readout_path, formmethod: :get, formnovalidate: true,
hidden: true, data: {turbo_stream: true} %>
</td>
</tr>
</tbody>
</table>
</fieldset>
<div class="hflex centered">
<%= form.button -%>
<%= image_link_to t(:cancel), "close-outline", measurements_path, name: :cancel,
class: 'dangerous', onclick: render_turbo_stream('form_close') %>
</div>
<% end %>