]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 595712: Return to bug page after login doesn't work with javascript disabled
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 23 Sep 2010 18:39:01 +0000 (20:39 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 23 Sep 2010 18:39:01 +0000 (20:39 +0200)
r=ghendricks a=LpSolit

template/en/default/account/auth/login-small.html.tmpl

index 41c0881d2ac01cad6652fe2c5b3c0b1638029c51..a7e72eaf1fcb6147678cd1fc687f92a89be5af86 100644 (file)
 
 <li id="mini_login_container[% qs_suffix %]">
   <span class="separator">| </span>
-  <a id="login_link[% qs_suffix %]" href="?GoAheadAndLogIn=1"
+  [% connector = "?" %]
+  [% IF cgi.request_method == "GET" AND cgi.query_string %]
+    [% connector = "&" %]
+  [% END %]
+  [% script_name = login_target _ connector _ "GoAheadAndLogIn=1" %]
+  <a id="login_link[% qs_suffix %]" href="[% script_name FILTER html %]"
      onclick="return show_mini_login_form('[% qs_suffix %]')">Log In</a>
   <form action="[% login_target FILTER html %]" method="POST" 
         class="mini_login bz_default_hidden"
 </li>
 <li id="forgot_container[% qs_suffix %]">
   <span class="separator">| </span>
-  <a id="forgot_link[% qs_suffix %]" href="?GoAheadAndLogIn=1#forgot"
+  <a id="forgot_link[% qs_suffix %]" href="[% script_name FILTER html %]#forgot"
      onclick="return show_forgot_form('[% qs_suffix %]')">Forgot Password</a>
   <form action="token.cgi" method="post" id="forgot_form[% qs_suffix %]"
         class="mini_forgot bz_default_hidden">