summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-24 00:02:20 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-03-24 00:02:20 +0000
commit27c390bb62d0304b724a4d4ef6431147365232ba (patch)
treee61bf09be78a72d47aba0c800e69cf13f70cca0c /app
parentc8af69342b92492892c6424e1a15671d5b1b5f83 (diff)
downloadredmine-27c390bb62d0304b724a4d4ef6431147365232ba.tar.gz
redmine-27c390bb62d0304b724a4d4ef6431147365232ba.zip
Fix duplicated 'back_url' IDs
Various hidden input fields are used to hold a URL to send the user back to the correct page after submitting a form, however, they all use the same ID which isn't allowed in HTML. Passing in 'id' as nil stops the 'hidden_field_tag' from adding an ID attribute to the tag. Contributed by Andrew Smith. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9250 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/views/issues/_list.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 2b0797614..ae10ee8f2 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -962,7 +962,7 @@ module ApplicationHelper
def back_url_hidden_field_tag
back_url = params[:back_url] || request.env['HTTP_REFERER']
back_url = CGI.unescape(back_url.to_s)
- hidden_field_tag('back_url', CGI.escape(back_url)) unless back_url.blank?
+ hidden_field_tag('back_url', CGI.escape(back_url), :id => nil) unless back_url.blank?
end
def check_all_links(form_name)
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 8201e2f95..f5b5bc1bb 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -1,5 +1,5 @@
<% form_tag({}) do -%>
-<%= hidden_field_tag 'back_url', url_for(params) %>
+<%= hidden_field_tag 'back_url', url_for(params), :id => nil %>
<div class="autoscroll">
<table class="list issues">
<thead><tr>