Sha256: 259200164db975ba56060bce91eda078fd4eed4bf8f4748fb7488eb14b2ff2df

Contents?: true

Size: 903 Bytes

Versions: 1

Compression:

Stored size: 903 Bytes

Contents

<div>
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @role } %>
</div>

<table>
  <%= form_tag [:admin, @role], :method => method do %>
    <tr><td><%= Spree.t(:name) %>:</td><td><%= text_field_tag 'role[name]', @role.name %></td></tr>
    <tr><td><%= Spree.t(:permissions) %>:</td>
    <td><% @permissions.each do |permission| %>
      <% if @role.has_permission?(permission.title) %>
        <span class='permission-check-box'><%= check_box_tag 'role[permission_ids][]', permission.id, true %> <%= permission.title.gsub('-',' ').titleize %></span>
      <% else %>
        <span class='permission-check-box'><%= check_box_tag 'role[permission_ids][]', permission.id %> <%= permission.title.gsub('-',' ').titleize %></span>
      <% end %>
      <br />
    <% end %></td></tr>
    <tr><td></td><td><%= submit_tag Spree.t(:save_changes) %></td></tr>
  <% end %>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_admin_roles_and_access-1.3.0 app/views/spree/admin/roles/_form.html.erb