blob: 02eef4717957537b5e98d3d48b8be68b5039aa28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<%= error_messages_for 'role' %>
<!--[form:role]-->
<p><label for="role_name"><%=_('Name')%> <span class="required">*</span></label><br />
<%= text_field 'role', 'name' %></p>
<strong><%=_('Permissions')%></strong>
<% permissions = @permissions.group_by {|p| p.group_id } %>
<% permissions.keys.sort.each do |group_id| %>
<fieldset><legend><%= _(Permission::GROUPS[group_id]) %></legend>
<% permissions[group_id].each do |p| %>
<div style="width:200px;float:left;"><%= check_box_tag "permission_ids[]", p.id, (@role.permissions.include? p) %>
<%= _(p.descr) %>
</div>
<% end %>
</fieldset>
<% end %>
<br />
<a href="javascript:checkAll('role_form', true)"><%=_('Check all')%></a> |
<a href="javascript:checkAll('role_form', false)"><%=_('Uncheck all')%></a><br />
<!--[eoform:role]-->
|