Patch #28242 » 0004-adds-toogle-checkboxes-feature-to-roles-permissions.patch
app/views/roles/_form.html.erb | ||
---|---|---|
48 | 48 |
<div class="box tabular" id="permissions"> |
49 | 49 |
<% perms_by_module = @role.setable_permissions.group_by {|p| p.project_module.to_s} %> |
50 | 50 |
<% perms_by_module.keys.sort.each do |mod| %> |
51 |
<fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend> |
|
51 |
<% module_name = mod.blank? ? 'module_project' : "module_#{mod}" %> |
|
52 |
<fieldset id="<%= module_name %>"><legend><%= toggle_checkboxes_link("##{module_name}\ input") %><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend> |
|
52 | 53 |
<% perms_by_module[mod].each do |permission| %> |
53 | 54 |
<label class="floating"> |
54 | 55 |
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name), |