diff --git a/app/helpers/form_tag_helper.rb b/app/helpers/form_tag_helper.rb
new file mode 100644
index 000000000..0d16834cf
--- /dev/null
+++ b/app/helpers/form_tag_helper.rb
@@ -0,0 +1,17 @@
+module FormTagHelper
+ def recaptcha_input_tag
+ if Rails.configuration.x.enable_recaptcha
+ res = "
"
+ res << recaptcha_tags
+ if flash[:recaptcha_error]
+ res << ""
+ res << flash[:recaptcha_error]
+ res << ''
+ end
+ res << '
'
+ res.html_safe
+ end
+ end
+end
diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb
index cdc6117b9..19685cd9d 100644
--- a/app/views/users/registrations/new.html.erb
+++ b/app/views/users/registrations/new.html.erb
@@ -38,12 +38,7 @@
<%= t 'users.registrations.new.team_name_help' %>
- <% if Rails.configuration.x.enable_recaptcha %>
-
- <%= recaptcha_tags %>
- <%= flash[:recaptcha_error] %>
-
- <% end %>
+ <%= recaptcha_input_tag %>
<%= f.submit "Sign up", class: "btn btn-primary" %>