= f.inputs t('title.line_items') do
  %table#line_items{'data-direct-account-id' => resource.direct_account.id}.nested-form-container
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody.sortable
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount

= f.inputs t('title.line_items') do
  %table#line_items.nested-form-container{'data-direct-account-id' => resource.direct_account.id}
    %thead
      = render 'line_items/list_header', :invoice => invoice
    %tbody.sortable
      = f.fields_for :line_items do |line_item|
        = render 'line_items/form', :line_item => line_item
    %tfoot
      = render 'line_items/list_footer', :total_amount => invoice.amount

Add nested-form-container class in line_items/list_form.
Add nested-form-container class in line_items/list_form.
