RE: Login popup: prevent maximization

Sofia P, modified 6 Years ago. New Member Posts: 3 Join Date: 10/12/18 Recent Posts

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?

Sofia P, modified 6 Years ago. New Member Posts: 3 Join Date: 10/12/18 Recent Posts
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.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
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.
Olaf Kock, modified 6 Years ago. New Member Posts: 19 Join Date: 7/28/10 Recent Posts
How did you end up preventing maximization?   Liferay seems to randomly display the login portlet maximized and sometimes modal for me.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
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.