diff options
-rw-r--r-- | app/views/timelog/bulk_edit.html.erb | 2 | ||||
-rw-r--r-- | test/functional/timelog_controller_test.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb index dc0bd92f3..f1d4ed979 100644 --- a/app/views/timelog/bulk_edit.html.erb +++ b/app/views/timelog/bulk_edit.html.erb @@ -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 %> diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index f91f33c7c..410bbd3e5 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -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 |