Gossamer Forum
Home : Products : DBMan : Customization :

Login Form CANCEL button redirect

Quote Reply
Login Form CANCEL button redirect
The users of my database go directly to the Main Menu without having to login, but I've given them the option to login which takes them to the login in form screen but once there if they decide to CANCEL logging in I'd like them to go back to the Main Menu of the database. However, as it is now when they hit the CANCEL button on the login form screen they always get the login screen again.

I'm guessing this is because I'm telling it to go there through some code db.cgi?db=default when I really want db.cgi?uid=default. Can someone tell me where/which files I need to change the code to get the CANCEL button working the way I'd like it to?
Quote Reply
Re: [zi94sm65] Login Form CANCEL button redirect In reply to
The cancel button is defined as:

<INPUT TYPE="SUBMIT" NAME="logoff" VALUE="Cancel">

which means it should take the user to the url defined in your .cfg file setting:

$auth_logoff = " ";

This is usually set to take users to your home page and not back within the database, so you may not want to change that url.

What you could do is to just remove the cancel button altogether and let them use the menu in the footer to return to the main page or to use the other menu options defined in your footer.

You can add the footer to that page by adding (before your ending body tags for the page):

|;
&html_footer;
print qq|

Or you could just provide a link on the login page to return to the main menu.

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Login Form CANCEL button redirect In reply to
I'd really like to keep the CANCEL button so I tried this code:
in auth.pl file in subroutine auth_check_password I added
Code:
elsif (($in{'logoff'}) { # The user is trying to CANCEL login.
return ('cancel','default',@auth_default_permissions);
}
then in the db.cgi file in the subroutine main I added
Code:
elsif ($status eq "cancel") {
&html_home;
}
This sort of works, but once you return to the main menu after the cancel the url's in the footer get messed up for search, list all, and logoff (missing the part 'db.cgi?') Any idea what could make that happen?