=semantic_form_for [:admin, @p_customer], :remote => true do |form|
  
  
  .content
    
    =form.inputs do
      = form.input :account_validated, :label => "Utilisateur validé ?" 
      = form.input :p_customer_cat_id, :label => "Catégorie client", :include_blank => false, :collection => PCustomerCat.order(:name).all, :as => :select
      
      = form.input :code, :label => "Code client :" 
      
      = form.input :siren, :label => "Numéro de Siren :"
      = form.input :ape, :label => "Code APE :"
      
      = form.input :email, :label => "Email client (login) :" 
      
      = form.input :generate_mdp, :label => "Forcer la génération d'un nouveau mot de passe ? (un mail sera envoyé au client)", :as => :boolean
      
      = form.input :password, :label => "Mot de passe :" 
      
      
      
        
     

      -if false
        %hr

        =form.semantic_fields_for :particular do |form| 
          =render :partial => "admin/particulars/form", :locals => {:form => form}
        
      Adresses :  
      
      

      .particulars_form
        =form.semantic_fields_for :particulars do |form|
          =render :partial => "admin/particulars/form", :locals => {:form => form}
      
      %p= link_to_add_fields "Ajouter une adresse", form, :particulars 
      
      %hr
      %hr
      
      Contacts du client :
      %hr
      
      .p_contacts_form
        =form.semantic_fields_for :p_contacts do |form|
          =render :partial => "admin/p_contacts/form", :locals => {:form => form}
    
      %p= link_to_add_fields "Ajouter une contact au client", form, :p_contacts
      
    
      
      %hr
      =form.input :p_price_cat_id, :label => "Catégories de prix :", :as => :select, :collection => PPriceCat.all, :include_blank => false
      
      %h4 Paiements
      
      = form.input :p_payment_type_id, :label => "Type de paiement :", :include_blank => false, :collection => PPaymentType.order(:name).all, :as => :select, :input_html => {:id => "payment_type_id_select"} 
      
      
      = form.input :comptant, :label => "Paiement comptant nécessaire ?" 
      
      = form.input :acompte, :label => "Acompte nécessaire ?" 
      = form.input :acompte_percent, :label => "Pourcentage d'acompte :" 
      
      = form.input :payment_delais, :label => "Délais jour de paiement :"
      
      = form.input :payment_fin_de_mois, :label => "Fin de mois ?"
      
      
  .actions=form.submit "sauvegarder", :class => "btn btn-primary"
  