Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Login form via modal window

Started by Sergei 8 years ago · 0 replies · 772 views
8 years ago

I’m a complete newbie to webdev, so thank you for your patience.

Want my users to login with the pop-up modal window (using the default Login plugin) instead of detached page.

Now I have such a window with the html.twig template in it. Like the default login page template it has form with user/pw inputs, button with name “task” and value “login.login” and messages.twig.html for result.

It works, but the modal closes after submitting. Stack here with the js/ajax and need your help please. Algorithm is: 1) if username/password correct show “success” message in modal for a second, close the modal and refresh the main page; 2) else just show “login failed” message and keep the modal window opened.

Thanks!

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 1 month ago
2 478 1 month ago
Plugins · by renedebaaij, 2 months ago
1 351 1 month ago
Plugins · by Thomas, 1 month ago
1 375 1 month ago
Plugins · by complanar, 2 months ago
6 699 2 months ago
Plugins · by BenLaKnet, 2 months ago
1 642 2 months ago