Project

General

Profile

Defect #15485 ยป multiple_ids_vanilla.diff

Ksenia Altbregen, 2013-11-22 16:32

View differences:

app/helpers/queries_helper.rb (working copy)
56 56
  def available_block_columns_tags(query)
57 57
    tags = ''.html_safe
58 58
    query.available_block_columns.each do |column|
59
      tags << content_tag('label', check_box_tag('c[]', column.name.to_s, query.has_column?(column)) + " #{column.caption}", :class => 'inline')
59
      tags << content_tag('label', check_box_tag('c[]', column.name.to_s, query.has_column?(column)) + " #{column.caption}", :id => nil, :class => 'inline')
60 60
    end
61 61
    tags
62 62
  end
app/views/watchers/autocomplete_for_user.html.erb (working copy)
1
<%= principals_check_box_tags 'watcher[user_ids][]', @users %>
1
<%= principals_check_box_tags 'watcher[user_ids][]', @users, :id => nil %>
app/views/watchers/_new.html.erb (working copy)
17 17
                 :project_id => @project) }')" %>
18 18

  
19 19
  <div id="users_for_watcher">
20
    <%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
20
    <%= principals_check_box_tags 'watcher[user_ids][]', :id => nil, (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %>
21 21
  </div>
22 22

  
23 23
  <p class="buttons">
app/views/custom_fields/_form.html.erb (working copy)
52 52
      <%= check_box_tag "custom_field[tracker_ids][]",
53 53
                        tracker.id,
54 54
                        (@custom_field.trackers.include? tracker),
55
                        :id => "custom_field_tracker_ids_#{tracker.id}" %>
55
                        :id => nil %>
56 56
      <label class="no-css" for="custom_field_tracker_ids_<%=tracker.id%>">
57 57
        <%= h(tracker.name) %>
58 58
      </label>
app/views/users/_memberships.html.erb (working copy)
24 24
                 :html => {:id => "member-#{membership.id}-roles-form",
25 25
                           :style => 'display:none;'}) do %>
26 26
        <p><% roles.each do |role| %>
27
        <label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role),
27
        <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil, membership.roles.include?(role),
28 28
                                                           :disabled => membership.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
29 29
        <% end %></p>
30 30
        <%= hidden_field_tag 'membership[role_ids][]', '' %>
......
58 58
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %>
59 59
<p><%= l(:label_role_plural) %>:
60 60
<% roles.each do |role| %>
61
  <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
61
  <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil %> <%= h role %></label>
62 62
<% end %></p>
63 63
<p><%= submit_tag l(:button_add) %></p>
64 64
<% end %>
app/views/users/_groups.html.erb (working copy)
1 1
<%= form_for(:user, :url => { :action => 'update' }, :html => {:method => :put}) do %>
2 2
<div class="box">
3 3
<% Group.all.sort.each do |group| %>
4
<label><%= check_box_tag 'user[group_ids][]', group.id, @user.groups.include?(group) %> <%=h group %></label><br />
4
<label><%= check_box_tag 'user[group_ids][]', group.id, @user.groups.include?(group), :id => nil %> <%= h group %></label><br />
5 5
<% end %>
6 6
<%= hidden_field_tag 'user[group_ids][]', '' %>
7 7
</div>
app/views/trackers/fields.html.erb (working copy)
31 31
          <%= l("field_#{field}".sub(/_id$/, '')) %>
32 32
        </td>
33 33
        <% @trackers.each do |tracker| %>
34
        <td style="text-align: center;">
35
          <%= check_box_tag "trackers[#{tracker.id}][core_fields][]", field, tracker.core_fields.include?(field),
34
        <td>
35
          <%= check_box_tag "trackers[#{tracker.id}][core_fields][]", field, :id => nil, tracker.core_fields.include?(field),
36 36
                            :class => "tracker-#{tracker.id} core-field-#{field}" %>
37 37
        </td>
38 38
        <% end %>
......
53 53
            <%= field.name %>
54 54
          </td>
55 55
          <% @trackers.each do |tracker| %>
56
          <td style="text-align: center;">
57
            <%= check_box_tag "trackers[#{tracker.id}][custom_field_ids][]", field.id, tracker.custom_fields.include?(field),
56
          <td>
57
            <%= check_box_tag "trackers[#{tracker.id}][custom_field_ids][]", field.id, :id => nil, tracker.custom_fields.include?(field),
58 58
                              :class => "tracker-#{tracker.id} custom-field-#{field.id}" %>
59 59
          </td>
60 60
          <% end %>
app/views/trackers/_form.html.erb (working copy)
10 10
  <label><%= l(:field_core_fields) %></label>
11 11
  <% Tracker::CORE_FIELDS.each do |field| %>
12 12
  <label class="block">
13
    <%= check_box_tag 'tracker[core_fields][]', field, @tracker.core_fields.include?(field) %>
13
    <%= check_box_tag 'tracker[core_fields][]', field, :id => nil, @tracker.core_fields.include?(field) %>
14 14
    <%= l("field_#{field}".sub(/_id$/, '')) %>
15 15
  </label>
16 16
  <% end %>
......
22 22
  <label><%= l(:label_custom_field_plural) %></label>
23 23
  <% IssueCustomField.all.each do |field| %>
24 24
    <label class="block">
25
      <%= check_box_tag 'tracker[custom_field_ids][]',field.id, @tracker.custom_fields.include?(field) %>
25
      <%= check_box_tag 'tracker[custom_field_ids][]', field.id, :id => nil, @tracker.custom_fields.include?(field) %>
26 26
      <%=h field.name %>
27 27
    </label>
28 28
  <% end %>
app/views/groups/_memberships.html.erb (working copy)
20 20
                 :url => { :action => 'edit_membership', :id => @group, :membership_id => membership },
21 21
                 :html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
22 22
        <p><% roles.each do |role| %>
23
        <label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label><br />
23
        <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil, membership.roles.include?(role) %> <%=h role %></label><br />
24 24
        <% end %></p>
25 25
        <p><%= submit_tag l(:button_change) %>
26 26
        <%= link_to_function(
......
56 56
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
57 57
<p><%= l(:label_role_plural) %>:
58 58
<% roles.each do |role| %>
59
  <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
59
  <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil %> <%=h role %></label>
60 60
<% end %></p>
61 61
<p><%= submit_tag l(:button_add) %></p>
62 62
<% end %>
app/views/roles/_form.html.erb (working copy)
21 21
    <fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
22 22
    <% perms_by_module[mod].each do |permission| %>
23 23
        <label class="floating">
24
        <%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name) %>
24
        <%= check_box_tag 'role[permissions][]', permission.name, :id => nil, (@role.permissions.include? permission.name) %>
25 25
        <%= l_or_humanize(permission.name, :prefix => 'permission_') %>
26 26
        </label>
27 27
    <% end %>
app/views/projects/settings/_modules.html.erb (working copy)
7 7
<legend><%= l(:text_select_project_modules) %></legend>
8 8

  
9 9
<% Redmine::AccessControl.available_project_modules.each do |m| %>
10
<p><label><%= check_box_tag 'enabled_module_names[]', m, @project.module_enabled?(m) -%>
10
<p><label><%= check_box_tag 'enabled_module_names[]', m, :id => nil, @project.module_enabled?(m) -%>
11 11
 <%= l_or_humanize(m, :prefix => "project_module_") %></label></p>
12 12
<% end %>
13 13
</fieldset>
app/views/projects/settings/_members.html.erb (working copy)
15 15
  <% members.each do |member| %>
16 16
  <% next if member.new_record? %>
17 17
  <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
18
  <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
18
  <td class="name <%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
19 19
  <td class="roles">
20 20
    <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span>
21 21
      <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
......
23 23
                                          :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }}
24 24
             ) do |f| %>
25 25
        <p><% roles.each do |role| %>
26
        <label><%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
26
        <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil, member.roles.include?(role),
27 27
                                                       :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br />
28 28
        <% end %></p>
29 29
        <%= hidden_field_tag 'membership[role_ids][]', '' %>
......
65 65

  
66 66
    <p><%= l(:label_role_plural) %>:
67 67
    <% roles.each do |role| %>
68
      <label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
68
      <label><%= check_box_tag 'membership[role_ids][]', role.id, :id => nil %> <%=h role %></label>
69 69
     <% end %></p>
70 70

  
71 71
    <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
app/views/projects/settings/_issue_categories.html.erb (working copy)
9 9
<% for category in @project.issue_categories %>
10 10
  <% unless category.new_record? %>
11 11
  <tr class="<%= cycle 'odd', 'even' %>">
12
    <td><%=h(category.name) %></td>
12
    <td class="name"><%=h(category.name) %></td>
13 13
    <td><%=h(category.assigned_to.name) if category.assigned_to %></td>
14 14
    <td class="buttons">
15 15
    	<% if User.current.allowed_to?(:manage_categories, @project) %>
app/views/projects/_form.html.erb (working copy)
32 32
<fieldset class="box tabular"><legend><%= l(:label_module_plural) %></legend>
33 33
<% Redmine::AccessControl.available_project_modules.each do |m| %>
34 34
    <label class="floating">
35
    <%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => "project_enabled_module_names_#{m}" %>
35
    <%= check_box_tag 'project[enabled_module_names][]', m, @project.module_enabled?(m), :id => nil %>
36 36
    <%= l_or_humanize(m, :prefix => "project_module_") %>
37 37
    </label>
38 38
<% end %>
......
46 46
<fieldset class="box tabular" id="project_trackers"><legend><%=l(:label_tracker_plural)%></legend>
47 47
<% @trackers.each do |tracker| %>
48 48
    <label class="floating">
49
    <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.include?(tracker) %>
49
    <%= check_box_tag 'project[tracker_ids][]', tracker.id, :id => nil, @project.trackers.include?(tracker) %>
50 50
    <%=h tracker %>
51 51
    </label>
52 52
<% end %>
......
58 58
<fieldset class="box tabular" id="project_issue_custom_fields"><legend><%=l(:label_custom_field_plural)%></legend>
59 59
<% @issue_custom_fields.each do |custom_field| %>
60 60
    <label class="floating">
61
  <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, (@project.all_issue_custom_fields.include? custom_field), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %>
61
  <%= check_box_tag 'project[issue_custom_field_ids][]', custom_field.id, :id => nil, (@project.all_issue_custom_fields.include? custom_field), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %>
62 62
  <%=h custom_field.name %>
63 63
  </label>
64 64
<% end %>
    (1-1/1)