Patch #44748 » redmine-webhook-project-select-all.patch
| app/views/webhooks/_form.html.erb | ||
|---|---|---|
|
<div class="splitcontentright">
|
||
|
<fieldset class="box" id="webhook_project_ids"><legend><%= toggle_checkboxes_link("#webhook_project_ids input[type=checkbox]") %><%= l(:label_project_plural) %></legend>
|
||
|
<p><%= check_all_links 'webhook_project_ids' %></p>
|
||
|
<% project_ids = @webhook.project_ids.to_a %>
|
||
|
<%= render_project_nested_lists(@webhook.setable_projects) do |p|
|
||
|
content_tag('label', check_box_tag('webhook[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + h(p))
|
||
| test/functional/webhooks_controller_test.rb | ||
|---|---|---|
|
test "should get edit" do
|
||
|
get :edit, params: { id: @hook.id }
|
||
|
assert_response :success
|
||
|
assert_select '#webhook_project_ids p a', text: I18n.t(:button_check_all)
|
||
|
assert_select '#webhook_project_ids p a', text: I18n.t(:button_uncheck_all)
|
||
|
end
|
||
|
test "should update webhook" do
|
||