From: Jean-Philippe Lang Date: Sun, 13 May 2012 09:00:26 +0000 (+0000) Subject: Fixed that option tags are escaped. X-Git-Tag: 2.0.0~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=426b1d6fcd106f3868414d2a4f69196583fb531e;p=redmine.git Fixed that option tags are escaped. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9683 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/workflows/copy.html.erb b/app/views/workflows/copy.html.erb index 057e40367..07001817a 100644 --- a/app/views/workflows/copy.html.erb +++ b/app/views/workflows/copy.html.erb @@ -8,15 +8,15 @@

<%= select_tag('source_tracker_id', - "" + - "" + + content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + + content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + options_from_collection_for_select(@trackers, 'id', 'name', @source_tracker && @source_tracker.id)) %>

<%= select_tag('source_role_id', - "" + - "" + + content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + + content_tag('option', "--- #{ l(:label_copy_same_as_target) } ---", :value => 'any') + options_from_collection_for_select(@roles, 'id', 'name', @source_role && @source_role.id)) %>

@@ -26,13 +26,13 @@

<%= select_tag 'target_tracker_ids', - "" + + content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + options_from_collection_for_select(@trackers, 'id', 'name', @target_trackers && @target_trackers.map(&:id)), :multiple => true %>

<%= select_tag 'target_role_ids', - "" + + content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '', :disabled => true) + options_from_collection_for_select(@roles, 'id', 'name', @target_roles && @target_roles.map(&:id)), :multiple => true %>

diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index b1526336c..5c37afc59 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -142,6 +142,18 @@ class WorkflowsControllerTest < ActionController::TestCase get :copy assert_response :success assert_template 'copy' + assert_select 'select[name=source_tracker_id]' do + assert_select 'option[value=1]', :text => 'Bug' + end + assert_select 'select[name=source_role_id]' do + assert_select 'option[value=2]', :text => 'Developer' + end + assert_select 'select[name=?]', 'target_tracker_ids[]' do + assert_select 'option[value=3]', :text => 'Support request' + end + assert_select 'select[name=?]', 'target_role_ids[]' do + assert_select 'option[value=1]', :text => 'Manager' + end end def test_post_copy_one_to_one