Fixed that option tags are escaped.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9683 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
478a549356
commit
426b1d6fcd
|
@ -8,15 +8,15 @@
|
|||
<p>
|
||||
<label><%= l(:label_tracker) %></label>
|
||||
<%= select_tag('source_tracker_id',
|
||||
"<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" +
|
||||
"<option value=\"any\">--- #{ l(:label_copy_same_as_target) } ---</option>" +
|
||||
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)) %>
|
||||
</p>
|
||||
<p>
|
||||
<label><%= l(:label_role) %></label>
|
||||
<%= select_tag('source_role_id',
|
||||
"<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" +
|
||||
"<option value=\"any\">--- #{ l(:label_copy_same_as_target) } ---</option>" +
|
||||
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)) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
@ -26,13 +26,13 @@
|
|||
<p>
|
||||
<label><%= l(:label_tracker) %></label>
|
||||
<%= select_tag 'target_tracker_ids',
|
||||
"<option value=\"\" disabled=\"disabled\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" +
|
||||
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 %>
|
||||
</p>
|
||||
<p>
|
||||
<label><%= l(:label_role) %></label>
|
||||
<%= select_tag 'target_role_ids',
|
||||
"<option value=\"\" disabled=\"disabled\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" +
|
||||
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 %>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue