From: Thijs Alkemade Date: Sun, 1 Feb 2015 10:33:01 +0000 (+0000) Subject: Fix two issues with the remember_me_openid button X-Git-Tag: live~4854 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/17f926fefb1329aaa41a64634d17d1dffd3ddba5 Fix two issues with the remember_me_openid button 1. It didn't work, the code only checked the remember_me button, not the remember_me_openid button. 2. It did not have a unique id, making the label next to it not work for selecting the checkbox. --- diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index a7bf53824..ea50113e5 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -276,12 +276,13 @@ class UserController < ApplicationController def login if params[:username] or using_open_id? - session[:remember_me] ||= params[:remember_me] session[:referer] ||= params[:referer] if using_open_id? + session[:remember_me] ||= params[:remember_me_openid] openid_authentication(params[:openid_url]) else + session[:remember_me] ||= params[:remember_me] password_authentication(params[:username], params[:password]) end end diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index 051d270a4..a78916dcc 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -54,7 +54,7 @@ (<%= t 'user.account.openid.link text' %>) -
+
<%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>