Remove JS popup when login expired
As part of 4.3 I implemented this idea.
Patch is attached, please provide feedback.
This is how it works now:
30 seconds before the login expires, a modalbox window slides down with a countdown of 30 seconds and a button to refresh the login. This does not require username/password, it simply extends the current session.
Once the countdown expires, a login form is automatically loaded. Login will refresh the session and the internal timer and allow the user to continue work as before.
(issue imported from #M9052)
#5 Updated by Ingo Renner over 12 years ago
some points about your patch:
- the class should go into typo3/classes/
- the license header is missing
- phpDoc is missing
- xclass definition is missing
- don't use tables for layout
- don't use inline html (though it is debatable here)
- the patch doesn't apply directly as it's not relative to the TYPO3 root directory (a, b at the beginning)
- include the modal box sources in the patch
- try using TYPO3's spinner, there should be one in typo3/gfx/ or so
#7 Updated by Christoph Koehler over 12 years ago
Thanks, will look at those.
tables for layout: Copied and pasted the html from the current login box in index.php, but will change that.
inline html: I assume you mean the return values of the ajax methods. We can talk about that.
patch: yeah, will change that, too.
modalbox source: benni asked me to zip it since it contains binary files (the spinner)
spinner: it's included in the modalbox, i would have to change the source to switch.
#9 Updated by Benni Mack over 12 years ago
my first remarks:
a) Your new class and all its methods does not have any comments nor License infos. Please add them.
b) Also, use PHP5 style methods (public / protected) for new functions
c) Don't echo anything directly. The AJAXObj will handle the output. Have a look at the TYPO3AJAX class and how it is used in other places in the core on how to return code as you want it.
d) Don't know if you need to urlencode this: "ajaxID=BackendLogin%3A%3AForm'
#11 Updated by Christoph Koehler about 12 years ago
Added file 9052_modal_login_2.diff with the newest changes.
I took most of the suggestions here into account.
I also changed the way that TBE_EDITOR determines a timeout. This will need some testing.
I changed jsfunc.tbe_editor.js slightly to use the busy.busyloadTime instead of the TBE EDITOR internal time, making it a little more unified.
It seems to work properly so that now, when you are editing a record and your login is timing out, once you relogin, the warning that your login expired will not show anymore.
Apply the patch and stick the files from the modalbox.zip archive into the contrib directory, so that it will be available from typo3/contrib/modalbox/modalbox.js.