Patch #44748 ยป redmine-webhook-project-select-all.patch
| app/views/webhooks/_form.html.erb | ||
|---|---|---|
| 37 | 37 | |
| 38 | 38 |
<div class="splitcontentright"> |
| 39 | 39 |
<fieldset class="box" id="webhook_project_ids"><legend><%= toggle_checkboxes_link("#webhook_project_ids input[type=checkbox]") %><%= l(:label_project_plural) %></legend>
|
| 40 |
<p><%= check_all_links 'webhook_project_ids' %></p> |
|
| 40 | 41 |
<% project_ids = @webhook.project_ids.to_a %> |
| 41 | 42 |
<%= render_project_nested_lists(@webhook.setable_projects) do |p| |
| 42 | 43 |
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 | ||
|---|---|---|
| 75 | 75 |
test "should get edit" do |
| 76 | 76 |
get :edit, params: { id: @hook.id }
|
| 77 | 77 |
assert_response :success |
| 78 |
assert_select '#webhook_project_ids p a', text: I18n.t(:button_check_all) |
|
| 79 |
assert_select '#webhook_project_ids p a', text: I18n.t(:button_uncheck_all) |
|
| 78 | 80 |
end |
| 79 | 81 | |
| 80 | 82 |
test "should update webhook" do |