Preserve field values on bulk edit failure (#13943).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11787 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
1269e6c7d3
commit
70bdb86c53
6 files changed
+63
-29
No files matched your search
@@ -330,7 +330,7 @@ module ApplicationHelper
|
||||
end
|
||||
groups = ''
|
||||
collection.sort.each do |element|
|
||||
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected)
|
||||
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected) || element.id.to_s == selected
|
||||
(element.is_a?(Group) ? groups : s) << %(<option value="#{element.id}"#{selected_attribute}>#{h element.name}</option>)
|
||||
end
|
||||
unless groups.empty?
|
||||
@@ -348,6 +348,10 @@ module ApplicationHelper
|
||||
options
|
||||
end
|
||||
|
||||
def option_tag(name, text, value, selected=nil, options={})
|
||||
content_tag 'option', value, options.merge(:value => value, :selected => (value == selected))
|
||||
end
|
||||
|
||||
# Truncates and returns the string as a single line
|
||||
def truncate_single_line(string, *args)
|
||||
truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ')
|
||||
|
||||
Reference in new issue
Block a user