Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Login form via modal window

Started by Sergei 8 years ago · 0 replies · 717 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 renedebaaij, 12 hours ago
0 17 12 hours ago
Plugins · by complanar, 2 weeks ago
6 379 2 weeks ago
Plugins · by BenLaKnet, 2 weeks ago
1 197 2 weeks ago
Plugins · by complanar, 1 month ago
2 473 4 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 750 2 months ago