=semantic_form_for [:admin, @import_csv], :remote => false, :multipart => true do |f|

  .content
    =f.inputs do
      = f.hidden_field :parent_id
      = f.input :name, :label => "Nom de l'import :"
      = f.input :file, :label => "file :" 
      
      = f.input :table_name, :label => "Type d'import :" , :as => :select, :collection => [["Base fournisseurs", "p_fournisseur"], ["Mise à jour catalogue prix","price_document"]]
            
      -if f.object.id
        %table.import_csv_champs_form
          -if f.object.import_csv_champs.count == 0
            -@import_csv.table_name.classify.constantize.import_csv_fields.each do |h|
              -f.object.import_csv_champs.new(:champ => h.to_s)  

          =f.semantic_fields_for :import_csv_champs do |form|
            =render :partial => "admin/import_csv_champs/form", :locals => {:form => form}

        =#%p= link_to_add_fields ic(:plus)+" Ajouter une correspondance", f, :import_csv_champs

      
      
      
  .actions=f.submit "sauvegarder", :class => "btn btn-primary"
  
