


=semantic_form_for [:admin, @admin], :remote => true do |f| 
  .content
    %h3
      -if @admin.id
        Modifier un admin
      -else
        Ajouter un admin

    = f.inputs do

      = f.input :email, :label => "Email :"
  

      = f.input :username, :label => "Login :"


      = f.input :name, :label => "Nom :"



      = f.input :firstname, :label => "Prénom :"


      = f.input :password, :label =>  "Mot de passe :", :as => :password


      = f.input :password_confirmation, :label =>  "Confirmation :", :as => :password
      
      = f.input :p_commercial_id, :label => "Commercial :", :include_blank => true, :collection => PCommercial.order(:name).all, :as => :select, :member_label => :long_name
      
      
      =f.input :super_admin, :label =>  "Super admin ?"
      
      =f.input :admin_roles, :label => "Rôles :", :collection => AdminRole.all, :as => :check_boxes
      
      
      =f.input :p_customers, :label => "Vue autorisée pour les clinets suivant :", :collection => PCustomer.all, :as => :check_boxes
  
  .actions= f.submit "Sauvegarder", :class => "btn btn-primary"

