Sha256: d1aade25a34994720c1b3837bbebb8fa2c2d682d0e02887866ca14da112f9f20

Contents?: true

Size: 1.57 KB

Versions: 8

Compression:

Stored size: 1.57 KB

Contents

<%= admin_form_for([:admin, @user.becomes(User)]) do |f| %>
  <%= f.inputs "Details" do %>
    <% if @user.new_record? %>
      <% Pageflow::AccountPolicy::Scope
           .new(current_user, Pageflow::Account).member_addable.each do |account| %>
        <%= quota_state_description(:users, account) %>
      <% end %>
    <% end %>

    <%= f.input :email, hint: f.object.new_record? &&
                                I18n.t('pageflow.admin.users.email_invitation_hint') %>
    <%= f.input :first_name %>
    <%= f.input :last_name %>
    <%= f.input :locale,
                as: :select,
                include_blank: false,
                collection: available_locales_collection %>

    <% if Pageflow::AccountPolicy::Scope
        .new(current_user, Pageflow::Account).member_addable.any? && @user.new_record? %>
      <%= f.input :initial_account,
                  collection: membership_accounts_collection(@user,
                                                             Pageflow::Membership.new(user: @user)),
                  include_blank: false,
                  selected: (params[:user][:initial_account] if params[:user].present?) %>
      <%= f.input :initial_role,
                  collection: membership_roles_collection('Pageflow::Account'),
                  include_blank: false,
                  hint: t('pageflow.admin.memberships.on_account.role.hint_html'),
                  selected: (params[:user][:initial_role] if params[:user].present?) %>
    <% end %>
    <%= f.input :admin if authorized?(:set_admin, current_user) %>
  <% end %>
  <%= f.actions %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pageflow-12.0.0 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc7 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc6 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc5 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc4 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc3 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc2 app/views/admin/users/_form.html.erb
pageflow-12.0.0.rc1 app/views/admin/users/_form.html.erb