Sha256: fd8175099a98df119f714aba88ca362f04263e8416a457dcee478d5ad328bc7b

Contents?: true

Size: 1.75 KB

Versions: 6

Compression:

Stored size: 1.75 KB

Contents

- content_for :sidebar do
  .sidebar
    .content
      %h2 Users
      = link_to "New User", new_user_path, class: 'btn btn-block btn-primary'

= form_for @user, :builder => Tenon::FormBuilder do |f|
  = error_messages_for :user

  .fields.large
    .form-group
      = f.text_field :email, :autocomplete => "off"

    .form-group.bordered
      - if @user.persisted?
        = f.super_label :password, "New Password"
      - else
        = f.super_label :password
      = f.password_field :password, :autocomplete => "off"
    .form-group
      - if @user.persisted?
        = f.super_label :password_confirmation, "Confirm New Password"
      - else
        = f.super_label :password_confirmation, "Confirm Password"
      = f.password_field :password_confirmation

  .fields.small
    %h4.box-label Roles
    .explanation Roles define a user's abilities throughout the site.
    .box
      .form-group.inline
        - @roles.each do |role|
          - unless (role.title == "Super Admin" && !current_user.is_super_admin?) || (role.title == "Admin" && !current_user.is_admin?)
            = check_box_tag('user[role_ids][]', role.id, @user.role_ids.include?(role.id), class: 'tn-checkbox-right', id: "role_id_#{role.id}")
            %label{ for: "role_id_#{role.id}" }= role.title
            .spacer

    %h4.box-label Actions
    .box
      .content
        = f.check_box :approved, class: 'tn-checkbox-right'
        = f.super_label :approved, "Approved?"

      .content
        = f.submit "Save", :class => 'btn btn-block btn-comp', data: { disable_with: "Please wait..." }

      - if @user.persisted?
        %hr
        .content
          = link_to "Delete", @user, :data => {:method => :delete, :confirm => "Are you sure you want to delete this?"}, :class => 'delete-link'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tenon-1.1.4 app/views/tenon/users/_form.html.haml
tenon-1.1.3 app/views/tenon/users/_form.html.haml
tenon-1.1.2 app/views/tenon/users/_form.html.haml
tenon-1.1.1 app/views/tenon/users/_form.html.haml
tenon-1.0.76 app/views/tenon/users/_form.html.haml
tenon-1.0.75 app/views/tenon/users/_form.html.haml