Skip to content

Commit

Permalink
Ajoute un captcha à la création d'une structure
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneCharignon committed Sep 13, 2024
1 parent a21ed79 commit cd595d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/nouvelles_structures_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions app/views/nouvelles_structures/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
</div>
<div class="panel">
<%= md t('.actions.validation') %>
Expand Down

0 comments on commit cd595d4

Please sign in to comment.