=semantic_form_for [:admin, @p_product], :remote => true do |f|

  .content
    =f.inputs do
      = f.input :enabled, :label => "Produit actif ?" 
      = f.input :p_product_cat_id, :label => "Catégorie produit :", :collection => PProductCat.all, :as => :select, :include_blank => false
      = f.input :name, :label => "Nom :" 
      = f.input :price, :label => "Prix moyen :" 
      
      = f.input :code, :label => "Code :" 
      = f.input :capacite, :label => "Capacité :" 
      = f.input :conditionnement, :label => "Conditionnement :" 
      = f.input :uv, :label => "Unité de vente :" 
      = f.input :compte_achat, :label => "Compte achat :" 
      = f.input :compte_vente, :label => "Compte vente :" 
      = f.input :compte_transport, :label => "Compte transport :" 
      
      
      
      = f.input :create_matiere, :label => "Composant unique", :as => :boolean if !@p_product.id
      %hr
      %h3
        Composants :
      %p= link_to_add_fields "Ajouter une ligne", f, :p_product_brut_products 

      .p_product_brut_products_form
        =f.semantic_fields_for :p_product_brut_products do |form|
          =render :partial => "admin/p_product_brut_products/form", :locals => {:form => form}
      
      %p Normes (à ajouter sur la facture) :
      
      = f.input :p_product_specs, :label => "Normes :", :collection => PProductSpec.order("code ASC").all, :as => :check_boxes
      
    
   
  .actions=f.submit "sauvegarder", :class => "btn btn-primary"
  