<tr class="line-item">
  <%= f.hidden_field :id %>
  <%= f.hidden_field :_destroy %>
  <%= f.hidden_field :item_id, class: "item-id-field" %>

  <td data-label="<%= t :label_description %>">
    <%= f.text_field :description,
          placeholder: l(:label_description),
          class: "line-item-description",
          autocomplete: "off",
          no_label: true,
          disabled: readonly %>
  </td>

  <td data-label="<%= t :label_qty %>">
    <%= f.number_field :quantity,
          step: 1,
          min: 1,
          value: (f.object.quantity.to_i > 0) ? f.object.quantity : 1,
          class: "qty-field",
          no_label: true,
          disabled: readonly %>
  </td>

  <td data-label="<%= t :label_price %>">
    <%= f.text_field :unit_price,
          class: "price-field",
          inputmode: "decimal",
          autocomplete: "off",
          no_label: true,
          disabled: readonly %>
  </td>

  <td class="line-total" data-label="<%= t :label_total %>">
    0.00
  </td>

  <% unless readonly %>
    <td class="actions">
      <button type="button"
              class="icon-only icon-del"
              title="<%= l(:label_remove) %>"
              data-nested-form-remove>
      </button>
    </td>
  <% end %>
</tr>