-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path_form.html.erb
49 lines (46 loc) · 1.5 KB
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<style>
.admin_roles ul {
list-style: none;
}
.admin_roles li {
margin: 5px 0;
}
.admin_roles strong {
margin-left: 5px;
}
</style>
<div data-hook="admin_role_form_fields">
<div class="alpha sixteen columns">
<fieldset data-hook="roles" class="admin_roles no-border-bottom">
<div class="alpha sixteen columns">
<div data-hook="name" class="field">
<%= f.label :name, I18n.t('spree.name') %>
<%= f.text_field :name, :class => 'fullwidth' %>
</div>
</div>
<div class="alpha eight columns">
<%= label_tag nil, I18n.t('spree.display_permissions') %>
<ul>
<% Spree::PermissionSet.display_permissions.each do |permission| %>
<li>
<%= check_box_tag 'role[permission_set_ids][]', permission.id, f.object.try(:permission_sets).include?(permission) %>
<strong><%= permission.name %></strong>
</li>
<% end %>
</ul>
</div>
<div class="omega eight columns">
<%= label_tag nil, I18n.t('spree.management_permissions') %>
<ul>
<% Spree::PermissionSet.management_permissions.each do |permission| %>
<li>
<%= check_box_tag 'role[permission_set_ids][]', permission.id, f.object.try(:permission_sets).include?(permission) %>
<strong><%= permission.name %></strong>
</li>
<% end %>
</ul>
</div>
</fieldset>
</div>
<div class="clear"></div>
</div>