From 4a3c92af466e555ca322e1815e67f42a8530777d Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 3 Mar 2021 15:17:13 +0100 Subject: [PATCH] suite --- app/views/public/p_customers/_new_form.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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