]> source.dussan.org Git - sonarqube.git/commitdiff
Redirect to Issues page from email notification does not work anymore if it goes...
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 28 Feb 2014 11:11:50 +0000 (12:11 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 28 Feb 2014 11:11:50 +0000 (12:11 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/sessions/login.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/sessions/new.html.erb
sonar-server/src/main/webapp/WEB-INF/lib/authenticated_system.rb

index e9e650fcb635bbe8af9d3507485b02c87e0425fe..0f4240aac390b1e56a64185270336dc2bd21c90e 100644 (file)
@@ -3,7 +3,7 @@
                        <td align="center">
                                <div id="login_form">
                                        <form action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
-            <input type="hidden" name="redirect_to_anchor" value="">
+            <input type="hidden" name="return_to_anchor" value="">
                                                <h3><%= label_tag message('login') %></h3>
                                                <p>
                                                        <%= text_field_tag 'login', '', {:maxlength => 40, :disabled => false, :style => 'width:200px;'} %>
@@ -31,5 +31,5 @@
        </table>
   <script>
     $j('#login').focus();
-    $j('[name=redirect_to_anchor]').val(window.location.hash);
+    $j('[name=return_to_anchor]').val(window.location.hash);
   </script>
index ad157bc46226dca08239588d4a5b46474b906606..39ce55666406bed071ff139fcfeb5ad5b4f75654 100644 (file)
@@ -3,7 +3,7 @@
     <td align="center">
       <div id="login_form">
         <form action="<%= url_for :controller => 'sessions', :action => 'login' -%>" method="post">
-          <input type="hidden" name="redirect_to_anchor" value="">
+          <input type="hidden" name="return_to_anchor" value="">
         <% if flash[:notice] %>
           <div class="notice"><%= flash[:notice] %></div>
         <% end %>
@@ -35,5 +35,5 @@
 </table>
 <script>
   $j('#login').focus();
-  $j('[name=redirect_to_anchor]').val(window.location.hash);
+  $j('[name=return_to_anchor]').val(window.location.hash);
 </script>
index 5f6f661a660bf9556aa02b7c7298a27e5e95298b..0ec3518fb2f5e47107b810d193383c1873fa55c8 100644 (file)
@@ -103,6 +103,8 @@ module AuthenticatedSystem
     rescue
       url
     end
+    anchor=params[:return_to_anchor]
+    url += anchor if anchor && anchor.start_with?('#')
     redirect_to(url)
     session[:return_to] = nil
   end