aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/user_controller.rb2
-rw-r--r--app/views/user/_signup.rhtml7
2 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 914d2d5bb..6916b4456 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -71,7 +71,7 @@ class UserController < ApplicationController
# Login form
def signin
work_out_post_redirect
-
+ @request_from_foreign_country = country_from_ip != MySociety::Config.get('ISO_COUNTRY_CODE', 'GB')
# make sure we have cookies
if session.instance_variable_get(:@dbman)
if not session.instance_variable_get(:@dbman).instance_variable_get(:@original)
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml
index 1f586b5e9..210643a40 100644
--- a/app/views/user/_signup.rhtml
+++ b/app/views/user/_signup.rhtml
@@ -2,9 +2,6 @@
<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %>
<%= foi_error_messages_for :user_signup %>
- <% if @request_from_foreign_country %>
- <%= recaptcha_tags %>
- <% end %>
<h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2>
@@ -39,6 +36,10 @@
<%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %>
</p>
+ <% if @request_from_foreign_country %>
+ <%= recaptcha_tags %>
+ <% end %>
+
<div class="form_button">
<%= hidden_field_tag 'token', params[:token], { :id => 'signup_token' } %>
<%= submit_tag _('Sign up') %>