Feature #29712 » feature-29712-v2.patch
| lib/redmine/field_format.rb | ||
|---|---|---|
|
end
|
||
|
def edit_tag(view, tag_id, tag_name, custom_value, options={})
|
||
|
view.text_area_tag(tag_name, custom_value.value, options.merge(:id => tag_id, :rows => 8))
|
||
|
if custom_value.custom_field.type == "IssueCustomField" && custom_value.custom_field.full_width_layout? && custom_value.custom_field.text_formatting == 'full'
|
||
|
content = view.content_tag 'span', :id => "#{tag_id}_and_toolbar" do
|
||
|
view.text_area_tag(tag_name, custom_value.value,
|
||
|
options.merge(:id => tag_id,
|
||
|
:rows => 8,
|
||
|
:cols => 60,
|
||
|
:class => 'wiki-edit'
|
||
|
))
|
||
|
end
|
||
|
content += view.wikitoolbar_for(tag_id, view.preview_issue_url(:project_id => custom_value.customized.project, :issue_id => custom_value.customized.id))
|
||
|
else
|
||
|
view.text_area_tag(tag_name, custom_value.value, options.merge(:id => tag_id, :rows => 8))
|
||
|
end
|
||
|
end
|
||
|
def bulk_edit_tag(view, tag_id, tag_name, custom_field, objects, value, options={})
|
||
| test/functional/issues_controller_test.rb | ||
|---|---|---|
|
assert_select 'option', text: /#{t.name}/, count: 0
|
||
|
end
|
||
|
def test_new_should_have_wikitoolbar_if_full_width_layout
|
||
|
@request.session[:user_id] = 2
|
||
|
field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1', :text_formatting => 'full', :is_for_all => true, :tracker_ids => [1])
|
||
|
get :new, :params => {
|
||
|
:project_id => 1
|
||
|
}
|
||
|
assert_select "span#issue_custom_field_values_#{field.id}_and_toolbar" do
|
||
|
assert_select "textarea[name='issue[custom_field_values][#{field.id}]']"
|
||
|
end
|
||
|
end
|
||
|
def test_update_form_for_new_issue
|
||
|
@request.session[:user_id] = 2
|
||
|
post :new, :params => {
|
||