diff options
author | David Cabo <david@calibea.com> | 2011-09-01 02:46:22 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-09-01 02:46:22 +0200 |
commit | 6a7c9cdd3c5bf3db7701ef1353f04527e96c8cc3 (patch) | |
tree | 59cfc21e66fc3c44eb01991ef03f253dcaaf010d /app/controllers/user_controller.rb | |
parent | 1fb99a4df2514cb6aea37fcf1fd4790234d77c7e (diff) | |
parent | 88c26439d7d00cc5f0e1ddcb7b0a0036fa3f9c88 (diff) |
Merge branch 'asktheeu-new-design' into develop (update New Request workflow to match new wireframes)
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 6916b4456..c53529bc3 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -8,6 +8,8 @@ class UserController < ApplicationController + layout :select_layout + protect_from_forgery :only => [ :contact, :set_profile_photo, :signchangeemail, @@ -106,7 +108,12 @@ class UserController < ApplicationController session[:user_id] = @user_signin.id session[:user_circumstance] = nil session[:remember_me] = params[:remember_me] ? true : false - do_post_redirect @post_redirect + + if is_modal_dialog + render :action => 'signin_successful' + else + do_post_redirect @post_redirect + end else send_confirmation_mail @user_signin end @@ -504,6 +511,15 @@ class UserController < ApplicationController private + def is_modal_dialog + (params[:modal].to_i != 0) + end + + # when logging in through a modal iframe, don't display chrome around the content + def select_layout + is_modal_dialog ? 'no_chrome' : 'default' + end + # Decide where we are going to redirect back to after signin/signup, and record that def work_out_post_redirect # Redirect to front page later if nothing else specified |