%= form_with(model: commitment_transaction, local: true) do |form| %> <%= render partial: "shared/show_errors", locals: {record: commitment_transaction} %> <%= edit_table_open %> <%= edit_table_row (CommitmentTransaction.human_attribute_name(:commitment_id)), (form.collection_select(:commitment_id, Commitment.all.ordered_by_name, :id, :format_for_formselect, {prompt: false, include_blank: true} )), "Impegno di riferimento" %> <%= edit_table_row (CommitmentTransaction.human_attribute_name(:date)), (date_input form, commitment_transaction, :date, :commitment_transaction_date), "Data del movimento" %> <%= edit_table_row (CommitmentTransaction.human_attribute_name(:amount)), (form.number_field :amount, id: :commitment_amount, step: :any, style: 'text-align: right;'), "Importo" %> <%= edit_table_row (CommitmentTransaction.human_attribute_name(:reference_year)), (form.number_field :reference_year, id: :commitment_transaction_reference_year, style: 'text-align: right;'), "Anno di competenza" %> <%= edit_table_row (CommitmentTransaction.human_attribute_name(:notes)), (form.text_area :notes, cols: 60, rows: 10, id: :commitment_notes), "Note" %> <%= edit_table_close %>