]> source.dussan.org Git - redmine.git/commitdiff
Don't generate back url with params.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 17:04:34 +0000 (17:04 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 Jul 2016 17:04:34 +0000 (17:04 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15629 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/_list.html.erb
app/views/timelog/_list.html.erb
test/functional/issues_controller_test.rb

index 26287e75c0905b87363d01aad3911f9e1e6f485b..2376a845bd40206ae9f3a3d4525f8b67734673dd 100644 (file)
@@ -1,5 +1,5 @@
 <%= form_tag({}) do -%>
-<%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
+<%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
 <div class="autoscroll">
 <table class="list issues <%= sort_css_classes %>">
   <thead>
index 89e1bc8c36fc15cfb5d3b1b6b690241c41d7f810..71fe41a685608987d505453343ff47b593b20659 100644 (file)
@@ -1,5 +1,5 @@
 <%= form_tag({}) do -%>
-<%= hidden_field_tag 'back_url', url_for(params) %>
+<%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
 <div class="autoscroll">
 <table class="list time-entries">
 <thead>
index 83cdb27ac6979f2092727cdf0472e2024227d159..176fd42e5bacdf99038a121ff2032883ece319bd 100644 (file)
@@ -721,6 +721,12 @@ class IssuesControllerTest < ActionController::TestCase
     end
   end
 
+  def test_index_should_include_back_url_input
+    get :index, :project_id => 'ecookbook', :foo => 'bar'
+    assert_response :success
+    assert_select 'input[name=back_url][value=?]', '/projects/ecookbook/issues?foo=bar'
+  end
+
   def test_index_sort
     get :index, :sort => 'tracker,id:desc'
     assert_response :success