X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Floginout%2Flogin.html;h=1785ea796b9865c76c0ce82689d194a33e97164c;hb=HEAD;hp=e5b45893b009a7fe7b3c6e7a3c668f2374cdbb40;hpb=3ff1fb4e10fdaef86527c10bd416e988d2a62a49;p=freeside.git diff --git a/httemplate/loginout/login.html b/httemplate/loginout/login.html index e5b45893b..1785ea796 100644 --- a/httemplate/loginout/login.html +++ b/httemplate/loginout/login.html @@ -1,5 +1,5 @@ <& /elements/header-minimal.html, 'Login' &> - +
@@ -13,10 +13,12 @@ % } %#
+% my $uri = $r->prev->uri; +% $uri .= '?'. $r->prev->args if length( $r->prev->args ); - + - +
@@ -25,6 +27,10 @@ + + + +
Username: Password:
One-time code:

@@ -39,30 +45,33 @@ my %error = ( 'no_cookie' => '', #First login, don't display an error - 'bad_cookie' => 'Bad Cookie', #timed out? server reboot? - 'bad_credentials' => 'Incorrect username / password', - 'logout' => 'You have been logged out.', + 'bad_cookie' => 'Bad Cookie', #timed out? + 'bad_credentials' => 'Incorrect username / password / one-time code', + #'logout' => 'You have been logged out.', ); -my $url_string = CGI->new->url; +my $error = # $cgi->param('logout') || + $r->prev->subprocess_env('AuthCookieReason'); -my $error = $cgi->param('logout') || $r->prev->subprocess_env("AuthCookieReason"); $error = exists($error{$error}) ? $error{$error} : $error; + +my $url_string = $r->uri; + #fake a freeside path for /login so we get our .css. shrug $url_string =~ s/login$/freeside\/login/ unless $url_string =~ /freeside\//; #even though this is kludgy and false laziness w/CGI.pm - $url_string =~ s{ / index\.html /? $ } - {/}x; - $url_string =~ - s{ - /(login|loginout) - ([\w\-\.\/]*) - $ - } - {}ix; - - $url_string .= '/' unless $url_string =~ /\/$/; +$url_string =~ s{ / index\.html /? $ } + {/}x; +$url_string =~ + s{ + /(login|loginout) + ([\w\-\.\/]*) + $ + } + {}ix; + +$url_string .= '/' unless $url_string =~ /\/$/;