Login and Register in bootboxjs popup using Laravel - modal-dialog

I am working on a Login and Register popup window using Bootboxjs which is opening properly but whenever i put wrong credentials (email or password) the modal window disappears. When I open login modal again I get error message on modal window but I want to ensure that modal window should not disappear if there are any validation failures or wrong credentials message.

Related

Navigation from modal not working in .net maui

How do you navigate from a modal popup?
I've opened a modal page using await NavigationService.PushModalAsync() which I'm using as a login page. With a successful login, I'm trying to close the modal and navigate to an account page.
await NavigationService.PopModalAsync();
await NavigationService.PushAsync();
The modal closes, but it will not show the page specified in the PushAsync Method.
Both lines of code run, no errors thrown.
The page the pushasync() goes to, displays fine if the login modal window is skipped.
The above code is in a [RelayCommand] method using community toolkit mvvm
What do I need to do to get the above to work?
Unfortunately your needs cannot be achieved. As mentioned in the figure above, the login page you created is a modal page, therefore it can navigate only to another modal page. When you call PopModalAsync, the login page pops up from ModalStack directly, meanwhile the (moldeless) page at the top of the NavigationStack will appear. And you call PushAsync to navigate to the account page in modal page, it doesn't work.

How to exit app with back button instead of just pop

I am building an app(Learning) and on first use the app it show authentication page with login and signup button if user click any one button and fill the fields it will be navigate to homePage.
Navigation :
Authentication Page=>login=>main page
Now the problem is I don't want users to get back to login page if they press back button on home page. Instead I want to exit the app.
How can I do it?
When you navigate from login to main page use Navigator method .pushReplacement() instead of .push() and that will replace the login page on Navigator stack. Which means that the main page will be the only one on the stack. Pressing the back button or calling method .pop(), in that case, will close the application.

how can I disable bootstrap modal on desktop and enable only for mobile/tablets?

enter image description here
We have two user interface, one for desktop and one for mobile, when user gonna login via desktop, then the username input and username password fields will show, and when it turns into mobile view, then both fields will be hidden and the screen shows look like below;
enter image description here
the issue is this, when I try to log in and click on login button, the login will appear ok, but when I click on login via desktop, the modal will appear too, I want to move or display hidden login popup on desktop screen. please answer.
You can handle click event on the button and check whether are input fields visible or not. If not, then show modal programmatically by calling $("#modal").modal('show')
So as default, use your login form as regular form (dont use bootstrap modal) and in JS:
$("#submitbutton").click(function() { //catch button click
if ( !$("#username").is(":visible") ) { //is mobile version?
event.preventDefault(); //dont send form
$("#modal").modal('show'); //but instead, show modal
}
});

Paypal button Return Url target

I am embedding Paypal button into my app and, customizing it by following https://developer.paypal.com/docs/integration/direct/identity/button-js-builder/
The issue is, I want to close the popup window and refresh my main site with the Return URL, but actually the popup window is refreshed.
Question is how to close the popup window and refresh the main site.

ios Facebook login button delegate/callback

I was just wondering how I can popup a loading screen blocker once the user has entered a username and password on ios Facebook connect dialog and after clicking the login button. I mean, where can I find the delegate that handles the action or callback upon clicking of login button.