forked from fixin.me/fixin.me
30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
<%= tabular_form_with model: Measurement.new do |form| %>
|
|
<fieldset>
|
|
<legend>
|
|
<%= tag.span id: :measurement_form_legend %>
|
|
<%= image_link_to '', "close-outline", measurements_path, name: :cancel,
|
|
class: 'dangerous', onclick: render_turbo_stream('form_close') %>
|
|
</legend>
|
|
<table class="items">
|
|
<tbody id="readouts">
|
|
<tr id="readouts_form">
|
|
<td>
|
|
<%= select_tag :id, quantity_options(@quantities), onchange:
|
|
"this.form.requestSubmit(document.getElementById('readout_submit'));",
|
|
class: 'quantity' %>
|
|
<%= form.submit id: :readout_submit, name: nil, value: nil,
|
|
formaction: new_readout_path, formmethod: :get, formnovalidate: true,
|
|
hidden: true, data: {turbo_stream: true} %>
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr id="measurement_form_actions">
|
|
<td colspan="4"><div class="actions centered"><%= form.button %></div></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
<% end %>
|