Sha256: c87272a3396fa439f14e48b56f90ea07ca1052f952db5bc7db37d94e0f82efd0

Contents?: true

Size: 911 Bytes

Versions: 5

Compression:

Stored size: 911 Bytes

Contents

<% update_name = "cr__" + context_role.to_s + "__" + set_id.to_s %>
<% unless update_partial %><div id="<%= update_name %>"><% end %>
  <% remote_form_for "/cbac/permissions/update", :url => cbac_permissions_update_path,
    :update => update_name, :before => "$('#{update_name}').style.visibility = 'hidden';",
    :complete => "$('#{update_name}').style.visibility = 'visible';" do %>
    <%= hidden_field_tag "context_role" + update_name, context_role.to_s, :name => "context_role" %>
    <%= hidden_field_tag "privilege_set_id" + update_name, set_id.to_s, :name => "privilege_set_id" %>
    <%= check_box_tag "permission" + update_name, "1",
      (Cbac::Permission.find(:all, :conditions => ["context_role = ? AND privilege_set_id = ?", context_role.to_s, set_id.to_s]).length > 0),
      {:onclick => "this.form.onsubmit();", :name => "permission"}%>
  <% end %>
<% unless update_partial %></div><% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cbac-0.5.4 generators/cbac/templates/views/permissions/_update_context_role.html.erb
cbac-0.5.3 generators/cbac/templates/views/permissions/_update_context_role.html.erb
cbac-0.5.2 generators/cbac/templates/views/permissions/_update_context_role.html.erb
cbac-0.5.1 generators/cbac/templates/views/permissions/_update_context_role.html.erb
cbac-0.3.1 generators/cbac/templates/views/permissions/_update_context_role.html.erb