]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Display the verifier if OAuth 1.0a is being used in OOB mode
[rails.git] / app / controllers / user_controller.rb
index 01e62ccc354d965b6a98e75c0ec8357aa64087f3..21561736c53b6c78d57a5257d58a5b8c602be0ba 100644 (file)
@@ -24,7 +24,7 @@ class UserController < ApplicationController
 
     if request.xhr?
       render :update do |page|
-        page.replace_html "contributorTerms", :partial => "terms"
+        page.replace_html "contributorTerms", :partial => "terms", :locals => { :has_decline => params[:has_decline] }
       end
     else
       @title = t 'user.terms.title'
@@ -206,7 +206,7 @@ class UserController < ApplicationController
         # them to that unless they've also got a block on them, in
         # which case redirect them to the block so they can clear it.
         if user.blocked_on_view
-          redirect_to user.blocked_on_view, :referrer => params[:referrer]
+          redirect_to user.blocked_on_view, :referer => params[:referer]
         elsif params[:referer]
           redirect_to params[:referer]
         else
@@ -220,6 +220,8 @@ class UserController < ApplicationController
       else
         flash.now[:error] = t 'user.login.auth failure'
       end
+    elsif flash[:notice].nil?
+      flash.now[:notice] =  t 'user.login.notice'
     end
   end