- @pagetitle = "Edit User Data"
- @crumb_list = []
- @crumb_list << link_to("Configuration", controller: "configuration", action: :index)
- @crumb_list << link_to("User Management", controller: "user", action: :index)
- @crumb_list << @pagetitle

%h2
  = "Editing User Data for User #{@displayed_user.login}"

= form_for(@displayed_user, url: user_save_path, method: 'post') do |f|
  = f.hidden_field(:login)
  %p
    = f.label(:realname, "Name:")
    %br
    = f.text_field(:realname, disabled: @configuration.ldap_enabled? && !@displayed_user.ignore_auth_services?)
  %p
    = f.label(:email, "e-Mail:")
    %br
    = f.text_field(:email, required: true, email: true, disabled: @configuration.ldap_enabled? && !@displayed_user.ignore_auth_services?)
  %p
    = f.collection_check_boxes(:role_ids, Role.global, :id, :title)
  %p
    = f.collection_radio_buttons(:state, user_states_for_edit, :to_s, :to_s)
  - if Configuration.ldap_enabled? && User.current.is_admin?
    %p
      = f.check_box(:ignore_auth_services, {}, checked_value = true)
      = f.label(:ignore_auth_services, 'Local user')
  %p
    = f.submit("Update")
