From d6b8343e0f2090a5cabcd1004b417f38b30774b7 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Thu, 14 Dec 2017 21:09:36 +0000 Subject: [PATCH 5/8] replace check_all_links in new tracker form with toogle_checkboxes_link --- app/views/trackers/_form.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb index 7b5b7ea..d8f7aa7 100644 --- a/app/views/trackers/_form.html.erb +++ b/app/views/trackers/_form.html.erb @@ -45,13 +45,12 @@
<% if @projects.any? %> -
<%= l(:label_project_plural) %> +
<%= toggle_checkboxes_link("#tracker_project_ids input[type=checkbox]") %><%= l(:label_project_plural) %> <% project_ids = @tracker.project_ids.to_a %> <%= render_project_nested_lists(@projects) do |p| content_tag('label', check_box_tag('tracker[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + h(p)) end %> <%= hidden_field_tag('tracker[project_ids][]', '', :id => nil) %> -

<%= check_all_links 'tracker_project_ids' %>

<% end %>
-- 2.1.4