diff --git a/app/views/public/p_customers/_new_form.html.haml b/app/views/public/p_customers/_new_form.html.haml index 50ea3cc..33389b4 100644 --- a/app/views/public/p_customers/_new_form.html.haml +++ b/app/views/public/p_customers/_new_form.html.haml @@ -5,7 +5,8 @@ =f.inputs do =f.hidden_field :valid_public - =f.input :parent_code, :label => "Code ambassadeur", :collection => PCustomer.where(:ambassadeur => true).map{|a| ["#{a.mlm_token} - #{a.show_name}", a.mlm_token]} + -if PCustomer.where(:ambassadeur => true).count > 0 + =f.input :parent_code, :label => "Code ambassadeur", :collection => PCustomer.where(:ambassadeur => true).map{|a| ["#{a.mlm_token} - #{a.show_name}", a.mlm_token]} =f.input :email, :label => "Email" =f.input :password, :label => "Mot de passe", :as => :password