Sha256: 916cb3a49d28e339ef98ac5d9f7b85d8b17b468723ab4840fb6c19bfc58bd5fb

Contents?: true

Size: 1.86 KB

Versions: 10

Compression:

Stored size: 1.86 KB

Contents

= within_new_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"

    span
      | Requested write access:  
      = yes_no(user.asked_for_write_access)

    br
    br
    - Renalware::Role.all.order(id: :asc).each_with_index do |role, index|
      - element_id = "user_role_ids_#{index}"
      - policy = Pundit.policy(current_user, user)
      = check_box_tag "user[role_ids][]",
                      role.id,
                      user.has_role?(role.name),
                      disabled: !(policy.assign_role?(role)),
                      id: element_id,
                      class: "inline"
      = label_tag element_id, role.name.humanize
    br

    = f.input :telephone,
              input_html: { class: "input small" },
              wrapper: :horizontal_small

    = f.input :consultant,
              as: :boolean,
              checked_value: "true",
              unchecked_value: "false",
              wrapper: :horizontal_small

    = f.input :hidden,
              as: :boolean,
              hint: " User will not be visible for selection in dropdowns".html_safe,
              checked_value: "true",
              unchecked_value: "false",
              wrapper: :horizontal_small
    - msg = user.approved? ? "Update" : "Approve"
    = f.submit msg, class: "button"
    span= " or "
    = link_to "cancel", admin_users_path

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
renalware-core-2.0.147 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.146 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.145 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.144 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.143 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.142 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.141 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.140 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.139 app/views/renalware/admin/users/edit.html.slim
renalware-core-2.0.138 app/views/renalware/admin/users/edit.html.slim