Fixed that activities option tags on the time entry bulk edit form are escaped.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9643 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-05-05 16:09:27 +00:00
parent 02f704bb01
commit ee8dcab9db
2 changed files with 7 additions and 1 deletions

View File

@ -29,7 +29,7 @@
<% if @available_activities.any? %>
<p>
<label><%= l(:field_activity) %></label>
<%= select_tag('time_entry[activity_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_activities, :id, :name)) %>
<%= select_tag('time_entry[activity_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_activities, :id, :name)) %>
</p>
<% end %>

View File

@ -278,6 +278,12 @@ class TimelogControllerTest < ActionController::TestCase
# System wide custom field
assert_tag :select, :attributes => {:name => 'time_entry[custom_field_values][10]'}
# Activities
assert_select 'select[name=?]', 'time_entry[activity_id]' do
assert_select 'option[value=]', :text => '(No change)'
assert_select 'option[value=9]', :text => 'Design'
end
end
def test_get_bulk_edit_on_different_projects