Permalink
Browse files

switch to invisible recaptcha

  • Loading branch information...
r888888888 committed Sep 16, 2017
1 parent 7048160 commit 43199eb1887324a81e6f1ecccf49f3af49b88b9a
Showing with 6 additions and 3 deletions.
  1. +4 −0 app/assets/javascripts/common.js
  2. +2 −3 app/views/users/new.html.erb
@@ -31,3 +31,7 @@ $(function() {
});
var Danbooru = {};
var submitInvisibleRecaptchaForm = function () {
document.getElementById("signup-form").submit();
};
@@ -9,14 +9,13 @@
<p>This includes favorites, uploads, and comments. Almost everything is public. So don't choose a name you don't want to be associated with.</p>
<div id="p3">
<%= simple_form_for(@user) do |f| %>
<%= simple_form_for(@user, html: {id: "signup-form"}) do |f| %>
<%= f.input :name, :as => :string %>
<%= f.input :email, :required => false, :as => :email %>
<%= f.input :password %>
<%= f.input :password_confirmation %>
<%= f.button :submit, "Sign up", :data => { :disable_with => "Signing up..." } %>
<%= recaptcha_tags %>
<%= invisible_recaptcha_tags callback: 'submitInvisibleRecaptchaForm', text: 'Sign up' %>
<% end %>
</div>
</div>

0 comments on commit 43199eb

Please sign in to comment.