= form_for [:admin, @list], html: {class: 'form-horizontal' } do |f|
  = render 'error_messages', target: @list
  .control-group class=(@list.errors[:state].any? ? 'error' : nil)
    = f.label :state, class: 'control-label'
    .controls
      = f.text_field :state, class: 'text_field'
  .control-group class=(@list.errors[:needs_help].any? ? 'error' : nil)
    = f.label :needs_help, class: 'control-label'
    .controls
      = f.check_box :needs_help, class: 'check_box'
  .control-group class=(@list.errors[:needs_payment].any? ? 'error' : nil)
    = f.label :needs_payment, class: 'control-label'
    .controls
      = f.check_box :needs_payment, class: 'check_box'
  .control-group class=(@list.errors[:closed_at].any? ? 'error' : nil)
    = f.label :closed_at, class: 'control-label'
    .controls
      = f.text_field :closed_at, class: 'text_field'
  .control-group class=(@list.errors[:table_id].any? ? 'error' : nil)
    = f.label :table_id, Table.model_name.human, class: 'control-label'
    .controls
      = f.collection_select :table_id, @tables, :id, :number, include_blank: nil
  .control-group class=(@list.errors[:supplier_id].any? ? 'error' : nil)
    = f.label :supplier_id, Supplier.model_name.human, class: 'control-label'
    .controls
      = f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil
  .form-actions
    = f.submit nil, class: 'btn btn-primary'
    '
    = link_to t("helpers.links.cancel"), admin_lists_path, class: 'btn'
