From: Go MAEDA Date: Sun, 29 Apr 2018 09:58:56 +0000 (+0000) Subject: Replace check_all_links in new custom field form with toogle_checkboxes_link (#27807). X-Git-Tag: 4.0.0~314 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c9c4a8c1535c603876c871387805ad11effacb26;p=redmine.git Replace check_all_links in new custom field form with toogle_checkboxes_link (#27807). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17319 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb index 94f417cfa..44a7a4b4a 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 %>