From e8fa5490dd5e6bf2707697ff8c2c5ee4606a3852 Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Thu, 14 Dec 2017 21:13:28 +0000 Subject: [PATCH 6/8] replace check_all_links in new custom field form with toogle_checkboxes_link --- app/views/custom_fields/_form.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb index 94f417c..44a7a4b 100644 --- a/app/views/custom_fields/_form.html.erb +++ b/app/views/custom_fields/_form.html.erb @@ -100,7 +100,7 @@ when "IssueCustomField" %> <%= hidden_field_tag 'custom_field[role_ids][]', '' %> -
<%=l(:label_tracker_plural)%> +
<%= toggle_checkboxes_link("#custom_field_tracker_ids input[type=checkbox]") %><%=l(:label_tracker_plural)%> <% tracker_ids = @custom_field.tracker_ids %> <% Tracker.sorted.each do |tracker| %> <%= check_box_tag "custom_field[tracker_ids][]", @@ -112,10 +112,9 @@ when "IssueCustomField" %> <% end %> <%= hidden_field_tag "custom_field[tracker_ids][]", '' %> -

<%= check_all_links 'custom_field_tracker_ids' %>

-
<%= l(:label_project_plural) %> +
<%= toggle_checkboxes_link("#custom_field_project_ids input[type=checkbox]:enabled") %><%= l(:label_project_plural) %>

<%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %>

@@ -124,7 +123,6 @@ when "IssueCustomField" %> content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p) end %> <%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %> -

<%= check_all_links 'custom_field_project_ids' %>

<% end %> -- 2.1.4