switch to invisible recaptcha

This commit is contained in:
r888888888
2017-09-16 12:49:48 -07:00
parent 704816066d
commit 43199eb188
2 changed files with 6 additions and 3 deletions

View File

@@ -31,3 +31,7 @@ $(function() {
});
var Danbooru = {};
var submitInvisibleRecaptchaForm = function () {
document.getElementById("signup-form").submit();
};

View File

@@ -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>