.center{:style => "text-align:center"}
  #new_product_customer_form_container
    %h1= qit "Pas encore de compte ?", "Pas encore de compte ?"

    = semantic_form_for [:public, @product_customer] do |f| 
      
      =f.inputs do 
        


          
      
        %p
          = label_tag :email, qit("email-label","email :")
        
        .form-group{:class => ("has-error has-feedback" if @product_customer.errors[:email].size > 0)}
          =f.text_field :email, :class => "form-control", :placeholder => qit("email","Email")
          -@product_customer.errors[:email].each do |error|
            .error
              =qit("your-email","Votre email")
              = error 
              
        %p
          = label_tag :password, qit("password-label","Mot de passe :")

        .form-group{:class => ("has-error has-feedback" if @product_customer.errors[:password].size > 0)}
          =f.password_field :password, :class => "form-control", :placeholder => qit("password","Mot de passe")
          -if @product_customer.errors[:password].uniq
            -@product_customer.errors[:password].uniq.each do |error|
              
              .error
                =qit("your-password","Votre mot de passe")
                = error

        =f.label :parent_code, "Code de recommandation "
        %p 
          =qit "offre-10-credits-offerts-parainnage" do
            Profitez d'un bon d'achat de 5€ avec un code de recommandation valide. Si vous n'en avez pas et que quelqu'un vous a parlé du site demandez lui, il en a certainement un !
        .form-group{:class => ("has-error has-feedback" if @product_customer.errors[:parent_code].size > 0)}
          =f.text_field :parent_code, :class => "form-control", :placeholder => qit("code-de-recommandation","Code de recommandation"), :onchange => "find_parrain( $(this).val());", :onkeyup => "find_parrain( $(this).val());", :onkeydown => "find_parrain( $(this).val());"
          -if @product_customer.errors[:parent_code].uniq
            -@product_customer.errors[:parent_code].uniq.each do |error|
              .error= error
      
      
        .parent
          =render :partial => "public/product_customers/find_parrain"
  

      =f.submit qit("account-create-save","Créer mon compte !"), :class => "btn btn-primary order_button"
      %br
      %br
      
      :coffeescript
          @find_parrain = (value) ->
            $.ajax({url : '/fr/public/product_customers/find_parrain.js', data : {parent_code :value}})
      
  
%br
%br
    
