forked from fixin.me/fixin.me
9c51887024
Stretch inputs to column width in place of fixed sizing. Set minimum column widths for columns with form inputs. Simplify table operations by removing `thead` and adding sentinel. Manage empty table display with CSS only.
17 lines
684 B
Plaintext
17 lines
684 B
Plaintext
<%= tabular_fields_for @quantity, form: form_tag do |form| %>
|
|
<%- tag.tr id: row, class: "form", onkeydown: "formProcessKey(event)",
|
|
data: {link: link, form: form_tag, hidden_row: hidden_row} do %>
|
|
|
|
<td style="--depth:<%= @quantity.depth %>">
|
|
<%= form.text_field :name, autofocus: true, class: 'hstretch', required: true %>
|
|
<td><%= form.text_area :description, class: 'hstretch', escape: false, rows: 1 %>
|
|
|
|
<td class="flex">
|
|
<%= form.button %>
|
|
<%= image_link_to t(:cancel), "close-outline", quantities_path,
|
|
class: 'dangerous', name: :cancel,
|
|
onclick: render_turbo_stream('form_close', {row: row}) %>
|
|
<td>
|
|
<% end %>
|
|
<% end %>
|