
=#debug @p_customer.errors.messages
= semantic_form_for [:public, @p_customer] do |f| 
  =hidden_field_tag :for_order, params[:for_order]
  =f.inputs do 
    =f.hidden_field :valid_public
    
    =f.input :parent_code, :label => "Code ambassadeur"
    
    =f.input :email, :label  => "Email"
    =f.input :password, :label => "Mot de passe", :as => :password
  
    =f.semantic_fields_for :particulars do |form|
      =render :partial => "public/particulars/inner_form", :locals => {:form => form}
    
    .row.qi_cancel_margins
      .col-sm-4
        = f.input :circuit_1_id, :label => "Circuit préféré 1 :", :include_blank => true, :collection => Circuit.all, :as => :select, :member_label => :member_label
      .col-sm-4
        = f.input :circuit_2_id, :label => "Circuit préféré 2 :", :include_blank => true, :collection => Circuit.all, :as => :select, :member_label => :member_label
      .col-sm-4
        = f.input :circuit_3_id, :label => "Circuit préféré 3 :", :include_blank => true, :collection => Circuit.all, :as => :select, :member_label => :member_label

    =f.input :cgv, :label  => raw("Je reconnais avoir pris connaissance des <a href='/fr/conditions-generales-utilisation.html' target='_blank' >conditions générales d'utilisation</a> du site")
    =f.input :rgpd, :label  => "J'accepte que mes coordonnées soient transmises à Dunlop et ses partenaires afin de pouvoir bénéficier de toutes les primes et offres présentes sur le site"

    %br

    %center=f.submit "Créer mon compte", :class => "new_btn new_btn_red new_btn_big"
  
    :scss
      .control-label{
        input{
          position:relative;
          top:5px;
        }
      }
  