]> mj.ucw.cz Git - pciids.git/commitdiff
Empty URLs for headers did not work for login
authorMichal Vaner <vorner@ucw.cz>
Thu, 21 Aug 2008 22:02:22 +0000 (00:02 +0200)
committerMichal Vaner <vorner@ucw.cz>
Thu, 21 Aug 2008 22:02:22 +0000 (00:02 +0200)
Login can be generated without redirection from different actions, the
login form was pushed to them.

PciIds/Html/Users.pm

index c5ed90ebd20f0e4415909abbabdcd2abccf5275d..eb0b6f133608f25205ae895d39e9f743d35a14a1 100644 (file)
@@ -182,7 +182,7 @@ sub genLoginForm( $$$$ ) {
        my $addr = PciIds::Address::new( $req->uri() );
        genCustomMenu( $addr, $args, [ [ 'Register', 'register' ], [ 'Reset password', 'respass' ] ] );
        print '<div class="error"><p>'.$error.'</div>' if( defined $error );
-       print '<form name="login" id="login" method="POST" action=""><table>';
+       print '<form name="login" id="login" method="POST" action="'.setAddrPrefix( $req->uri(), 'mods' ).buildExcept( 'action', $args ).'?action=login"><table>';
        genForm( [ [ 'Login name or email:', 'text', 'login', 'maxlength="255"' ],
                [ 'Password:', 'password', 'password' ],
                [ '', 'submit', 'login', 'value="Login"' ] ], $values );