Skip to content

Commit cd595d4

Browse files
Ajoute un captcha à la création d'une structure
1 parent a21ed79 commit cd595d4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/controllers/nouvelles_structures_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def show
1111

1212
def create
1313
@compte = Compte.new compte_parametres
14-
if @compte.save
14+
if verify_recaptcha(model: @compte) && @compte.save
1515
envoie_emails
1616
sign_in @compte
1717
redirect_to admin_dashboard_path, notice: I18n.t('nouvelle_structure.bienvenue')

app/views/nouvelles_structures/show.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
<%= render partial: "admin/comptes/demande_acceptation_cgu_creation_compte", locals: { scope: 'creation_compte' } %>
4343
<%= compte.input :cgu_acceptees, label: t('creation_compte.cgu_acceptees'), required: true %>
4444
<% end %>
45+
<%= recaptcha_tags %>
4546
</div>
4647
<div class="panel">
4748
<%= md t('.actions.validation') %>

0 commit comments

Comments
 (0)