diff --git a/app/controllers/nouvelles_structures_controller.rb b/app/controllers/nouvelles_structures_controller.rb index ac9b0799c..27be5eed9 100644 --- a/app/controllers/nouvelles_structures_controller.rb +++ b/app/controllers/nouvelles_structures_controller.rb @@ -11,7 +11,7 @@ def show def create @compte = Compte.new compte_parametres - if @compte.save + if verify_recaptcha(model: @compte) && @compte.save envoie_emails sign_in @compte redirect_to admin_dashboard_path, notice: I18n.t('nouvelle_structure.bienvenue') diff --git a/app/views/nouvelles_structures/show.html.erb b/app/views/nouvelles_structures/show.html.erb index 980f4edf0..58eb5c5ae 100644 --- a/app/views/nouvelles_structures/show.html.erb +++ b/app/views/nouvelles_structures/show.html.erb @@ -42,6 +42,7 @@ <%= render partial: "admin/comptes/demande_acceptation_cgu_creation_compte", locals: { scope: 'creation_compte' } %> <%= compte.input :cgu_acceptees, label: t('creation_compte.cgu_acceptees'), required: true %> <% end %> + <%= recaptcha_tags %>
<%= md t('.actions.validation') %>