diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 15:19:32 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 15:35:17 +0100 |
commit | a2817f8877a5e37962f81dd96f5ef79ad4a6b0c4 (patch) | |
tree | 2d71f55483cd66b926397f89efcef4dbcb3adaf4 | |
parent | 1ae1a120ae5b034ba9efc0f433224fe993a61920 (diff) |
ensure recaptcha appears on register form, and move to end of form
-rw-r--r-- | app/controllers/user_controller.rb | 2 | ||||
-rw-r--r-- | app/views/user/_signup.rhtml | 7 |
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') %> |