Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Login popup: prevent maximization
Hi!
I am using Liferay 7 to build an app. I need to display the login dialog in a modal and have done so in main.js:
'liferay-sign-in-modal',
function(A) {
var signIn = A.one('.sign-in > a');
if (signIn) {
signIn.plug(Liferay.SignInModal);
}
}
Problem is that when user inputs wrong credentials, window is maximized and error messages are displayed. Is it possible to prevent this maximization and display errors in popup? I've been trying to modify the login.jsp file and search the web for help and haven't had any success. Any hints?
Ok I discovered how to prevent the maximization. But setting WindowState to normal still closes the popup. I also tried to set WindowState to exclusive as popup has this state, but this just makes everything look completely crazy.
I can not believe that no-one else haven't had this problem. What am I doing wrong? Please help.
I can not believe that no-one else haven't had this problem. What am I doing wrong? Please help.
I had it, once. I don't remember, how I solved it, but I got somehow rid of the maximize flag in the url.
But most of the time, my customers don't use the standard login at all.
In the last couple of years, I had three customers, who have a single sign on system in place and we integrated Liferay into that system. Two use NTLM. Two others were fine with the standard login behavior.
For one recent customer, we hooked the login portlet and actually completely replaced the login function with rest calls. We just hooked it to have our login in place, when people try to access secured resources.
But most of the time, my customers don't use the standard login at all.
In the last couple of years, I had three customers, who have a single sign on system in place and we integrated Liferay into that system. Two use NTLM. Two others were fine with the standard login behavior.
For one recent customer, we hooked the login portlet and actually completely replaced the login function with rest calls. We just hooked it to have our login in place, when people try to access secured resources.
How did you end up preventing maximization? Liferay seems to randomly display the login portlet maximized and sometimes modal for me.
Well, it is hardcoded somewhere.
I think I did something really dastardly like cutting the maximize parameter away from the url/request. I am not sure anymore, it was a long time ago, but I believe I "fixed" the url somehow in a reverse proxy.
I don't remember the process anymore, maybe you could also fix the url with javascript.
I think I did something really dastardly like cutting the maximize parameter away from the url/request. I am not sure anymore, it was a long time ago, but I believe I "fixed" the url somehow in a reverse proxy.
I don't remember the process anymore, maybe you could also fix the url with javascript.