Sha256: 10db45cfdae68af0915abc2c410f7ca04735e31ffdfa99c59d037df23044a369

Contents?: true

Size: 1.99 KB

Versions: 9

Compression:

Stored size: 1.99 KB

Contents

<%= tb_form_for @user, :url => path, :remote => true, :data => {:errors => :inline, :success => back_or_default(admin_users_path)}, :html => {:class => 'user-form'} do |f| %>

  <%= tb_form_error_header(f.object) %>

  <%= f.tb_sub_title 'User Details' %>

  <% if !Spud::Core.config.use_email_as_login %>
    <%= f.tb_text_field :login %>
  <% end %>
  <%= f.tb_text_field :email %>
  <%= f.tb_text_field :first_name %>
  <%= f.tb_text_field :last_name %>
  <%= f.tb_time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones, {:default => Rails.application.config.time_zone} %>

  <%= render :partial => 'form_additions', :locals => {:f => f} %>

  <%= f.tb_sub_title 'Credentials' %>

  <%= f.tb_password_field :password %>
  <%= f.tb_password_field :password_confirmation %>

  <div class="form-group">
    <div class="col-sm-10 col-sm-offset-2">
      <%= link_to 'Generate Password', '#', :class => 'btn btn-default btn-sm btn-generate-password' %>
      <span class="generated-password text-success"></span>
    </div>
  </div>

  <div class="form-group">
    <%= f.tb_label :requires_password_change %>
    <div class="col-sm-10">
      <%= f.check_box :requires_password_change %>
      <span class="text-muted">Require the user changes their password the next time they log in.</span>
    </div>
  </div>

  <div class="form-group user-send-email-group">
    <%= label_tag :send_email, 'Send email', :class => 'control-label col-sm-2' %>
    <div class="col-sm-10">
      <%= check_box_tag :send_email %>
      <span class="text-muted">Send the user an email containing their password.</span>
    </div>
  </div>

  <%= f.tb_sub_title 'Permissions' %>

  <%= f.tb_check_box :super_admin, :help_block => 'The super administrator bypasses all permissions and roles.' %>
  <%= f.tb_select :spud_role_id, options_from_collection_for_select(SpudRole.all, :id, :name, f.object.spud_role_id), {:include_blank => 'No Role'} %>

  <%= f.tb_save_buttons('User', @user.new_record? ? admin_users_path : admin_user_path(@user)) %>

<% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tb_core-1.4.3.1 app/views/admin/users/_form.html.erb
tb_core-1.4.3 app/views/admin/users/_form.html.erb
tb_core-1.4.2 app/views/admin/users/_form.html.erb
tb_core-1.4.1 app/views/admin/users/_form.html.erb
tb_core-1.4.0.1 app/views/admin/users/_form.html.erb
tb_core-1.4.beta2 app/views/admin/users/_form.html.erb
tb_core-1.4.beta1 app/views/admin/users/_form.html.erb
tb_core-1.3.10 app/views/admin/users/_form.html.erb
tb_core-1.3.9 app/views/admin/users/_form.html.erb