The chartsearch module is almost making all it’s calls to the server using ajax and one issue i noticed is that the more idle it takes after the user has loaded the page, he/she is automatically signed out out openmrs,
I therefore need a way of redirecting to the login page just in-case the user is logged, and back to the previous page after a successful login.
I have tried to look around and so no controller where such a thing is done in the same way.
Here is for-example one of my controller method that i call into using ajax
The vitals app is an example of a form that will popup a login dialog box if you try submitting after the session has expired. The code responsible for this is at:
In the above, you could look at:
htmlForm.submitHtmlForm = function(),
htmlForm.loginThenSubmitHtmlForm = function(), var
checkIfLoggedInAndErrorsCallback = function(isLoggedIn)