Sha256: 3666f9b3ba463a513285676405b473fce67f7bb09db0c49452c22c241127fa62

Contents?: true

Size: 934 Bytes

Versions: 6

Compression:

Stored size: 934 Bytes

Contents

<% if @user.new_record? && Pageflow.config.quotas.get(:users, @user.account).exhausted? %>
  <%= render 'admin/users/quota_exhausted' %>
<% else %>
  <%= semantic_form_for([:admin, @user.becomes(User)]) do |f| %>
    <%= f.inputs "Details" do %>
      <% if @user.new_record? %>
        <%= quota_state_description(:users, @user.account) %>
      <% end %>

      <%= f.input :email, :hint => f.object.new_record? && I18n.t('admin.users.email_invitation_hint') %>
      <%= f.input :first_name %>
      <%= f.input :last_name %>
      <% if authorized?(:read, Pageflow::Account) %>
        <%= f.input :account, :include_blank => false %>
      <% end %>
      <%= f.input :role, :collection => collection_for_user_roles, :include_blank => false, :hint => authorized?(:read, Pageflow::Account) ? I18n.t('admin.users.role_hint.admin') : I18n.t('admin.users.role_hint.other') %>
    <% end %>
    <%= f.actions %>
  <% end %>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pageflow-0.6.0 app/views/admin/users/_form.html.erb
pageflow-0.5.0 app/views/admin/users/_form.html.erb
pageflow-0.4.0 app/views/admin/users/_form.html.erb
pageflow-0.3.0 app/views/admin/users/_form.html.erb
pageflow-0.2.1 app/views/admin/users/_form.html.erb
pageflow-0.2.0 app/views/admin/users/_form.html.erb