Sha256: f3e7f8dc702ddbfcee8a84794ea53e7e07151b0cf8d1aff73382cfcd93951e01

Contents?: true

Size: 926 Bytes

Versions: 5

Compression:

Stored size: 926 Bytes

Contents

<% update_name = generic_role.id.to_s + "__" + user_id.to_s %>
<% unless update_partial %><div id="<%= update_name %>"><% end %>
  <% form_for "/cbac/memberships/update", :remote => true, :url => {:controller => "cbac/memberships", :action => "update"},
    :update => update_name, :before => "$('#{update_name}').style.visibility = 'hidden';",
    :complete => "$('#{update_name}').style.visibility = 'visible';" do %>
    <%= hidden_field_tag "generic_role_id" + update_name, generic_role.id.to_s, :name => "generic_role_id" %>
    <%= hidden_field_tag "user_id" + update_name, user_id.to_s, :name => "user_id" %>
    <%= check_box_tag "member" + update_name, "1",
      (Cbac::Membership.find(:all, :conditions => ["generic_role_id = ? AND user_id = ?", generic_role.id.to_s, user_id.to_s]).length > 0),
      {:onclick => "this.form.onsubmit();", :name => "member"}%>
  <% end %>
<% unless update_partial %></div><% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cbac-0.6.8 lib/generators/cbac/copy_files/views/memberships/_update.html.erb
cbac-0.6.7 lib/generators/cbac/copy_files/views/memberships/_update.html.erb
cbac-0.6.5 lib/generators/cbac/copy_files/views/memberships/_update.html.erb
cbac-0.6.4 lib/generators/cbac/copy_files/views/memberships/_update.html.erb
cbac-0.6.2 lib/generators/cbac/copy_files/views/memberships/_update.html.erb