Patch #15234
openA popup message after session timeout
0%
Description
When the session timeout is set and a user leaves an unsaved form for a while so their session expires and clicks on the Save button, they is redirected to the login page and all unsaved data from the form just being edited are lost.
The same frustrating situation can happend when you write a long wiki page.
The flash message on the login page does't help to recover lost data.
I thing that the user should be warn before data are lost.
Please take into account the attached simple patch that add a Javascript popup message with the warning text about session expiration.
Files
Related issues
Updated by Etienne Massip over 9 years ago
I guess that the patch won't work if redmine is installed with a sub-URI.
Also, won't the heartbeat request reactivate the session?
Updated by Karel Pičman over 9 years ago
I guess that the patch won't work if redmine is installed with a sub-URI.
I've removed the slash in route.rb:
-get '/session_heartbeat', :to => 'application#session_heartbeat'
+get 'session_heartbeat', :to => 'application#session_heartbeat'
Also, won't the heartbeat request reactivate the session?
I don't think so. I skip the reactivation in session_expiration method:
def session_expiration
+ # Skip session heartbeat
+ return if ((params[:controller] == 'application') && (params[:action] = 'session_heartbeat'))
Updated by Toshi MARUYAMA over 9 years ago
- Related to Feature #10569: Save user data on invalid form authenticity token added