Commit ce68050d authored by maeda's avatar maeda
Browse files

Adds toggle checkboxes feature to roles permissions (#28242).

Patch by Marius BALTEANU.


git-svn-id: https://svn.redmine.org/redmine/trunk@17216 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d597850a
......@@ -48,7 +48,8 @@
<div class="box tabular" id="permissions">
<% perms_by_module = @role.setable_permissions.group_by {|p| p.project_module.to_s} %>
<% perms_by_module.keys.sort.each do |mod| %>
<fieldset><legend><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
<% module_name = mod.blank? ? 'module_project' : "module_#{mod}" %>
<fieldset id="<%= module_name %>"><legend><%= toggle_checkboxes_link("##{module_name}\ input") %><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
<% perms_by_module[mod].each do |permission| %>
<label class="floating">
<%= check_box_tag 'role[permissions][]', permission.name, (@role.permissions.include? permission.name),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment