Sha256: d4ece2208380db4c4bc1daf8a14097e776fd7feba77d37d6aede191916b80dd1

Contents?: true

Size: 692 Bytes

Versions: 5

Compression:

Stored size: 692 Bytes

Contents

<%= simple_form_for [@site, @user] do |f| %>
  <%= f.input :name %><br />
  <%= f.input :email %><br />

  <% if @current_user.admin? %>
    <%= f.collection_check_boxes(
      :site_ids,
      @current_user.sites,
      :id,
      :name,
      checked: @selected_sites
    ) do |s| %>
      <%= s.check_box(disabled: (s.value == @site.id), id: "site-id-#{s.value}") %>
    <%= s.text %>
    <% end %>
  <% end %>

  <% if current_user.admin? %>
    <%= f.collection_select :roles, Cas::User::ROLES, :to_s, :humanize %></p>
  <% end %>
  <%= f.input :password, required: false %><br />
  <%= f.input :password_confirmation %><br />

  <%= f.button :submit, id: "save-form" %><br />
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cas-cms-1.0.0.alpha2 app/views/cas/sites/users/_form.html.erb
cas-cms-1.0.0.alpha1 app/views/cas/sites/users/_form.html.erb
cas-cms-0.1.3 app/views/cas/sites/users/_form.html.erb
cas-cms-0.1.2 app/views/cas/sites/users/_form.html.erb
cas-cms-0.1.1 app/views/cas/sites/users/_form.html.erb