Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Login form via modal window

Started by Sergei 7 years ago · 0 replies · 572 views
7 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 Rene, 1 week ago
2 75 1 week ago
Plugins · by Xavier, 4 weeks ago
2 81 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1208 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 75 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 99 2 months ago