Sha256: e83db377e39badb5a42acd035c4cbbdf39c472f46a03d91228d8b26ffe7d5ab5

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

= within_admin_layout(title: "Edit",
                      breadcrumbs: breadcrumb_for("Users", admin_users_path)) do

  h2= @user

  = simple_form_for @user,
                    html: { autocomplete: "off" },
                    url: admin_user_path(@user) do |f|
    = f.input :approved, as: :hidden, input_html: { value: true }

    - if @user.errors.any?
      ul.error-messages
        - @user.errors.full_messages.each do |msg|
          li= msg

    - if @user.expired?
      .row
        = check_box_tag "user[unexpire]", true, false, class: "inline"
        = label_tag :user_unexpire, "Reactivate account"

    br
    - Renalware::Role.all.each_with_index do |role, index|
      - element_id = "user_role_ids_#{index}"
      = check_box_tag "user[role_ids][]",
                      role.id,
                      @user.has_role?(role.name),
                      disabled: role.hidden,
                      id: element_id,
                      class: "inline"
      = label_tag element_id, role.name.humanize
    br
    br
    = f.input :telephone,
              input_html: { class: "input small" },
              wrapper: :horizontal_small


    - msg = @user.approved? ? "Update" : "Approve"
    = f.submit msg, class: "button"
    span= " or "
    = link_to "cancel", admin_users_path

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta9 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.0.pre.beta8 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.0.pre.beta7 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.0.pre.beta6 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.0.pre.beta5 app/views/renalware/admin/users/edit.html.slim