This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/app/views/roles/_role_form.rhtml

14 lines
650 B
Plaintext
Raw Normal View History

<p>
<label for="role_name">Name</label> <%= text_field :role, :name %>
</p>
<p>
<label for="role_code">Code</label> <%= text_field :role, :code %>
</p>
<p>
<label for="role_parent_id">Parent</label> <%= select :role, :parent_id, Role.for_select, { :include_blank => true, :selected => @role.parent_id.to_s } %>
</p>
<h3>Permissions</h3>
<p><%= link_to_function "Check All", "set_all_checkboxes('role_form', 'role[permission_ids][]', true);" -%> <%= link_to_function "Uncheck All", "set_all_checkboxes('role_form', 'role[permission_ids][]', false);" -%>
<ul>
<%= render :partial => 'permission', :collection => Permission.find_for_form -%>
</ul>