<commit_before>%input{:type => :hidden, :id =>'page_identifier', :value => "admin/users.#{@user.id}.edit"}

%h1
  Admin user edit - @user.firstname

=form_for :user, :url => admin_user_path(@user), :html => { :method => :put } do |form|
  %p
    = label :user, :firstname
    = form.text_field :firstname
  %p
    = label :user, :lastname
    = form.text_field :lastname
  %p
    = label :user, :email
    = form.text_field :email
  %p
    = label :user, :role
    = form.select :role, options_for_select([['student', 0], ['supervisor', 1], ['admin', 2]], @user.role)
  %p
    = label :user, :notify_by_email
    = form.check_box :notify_by_email
  %p
    = form.submit "Update user", :class => "btn btn-primary"

  %p.danger
    %h3 Danger area
    = form.submit "Send password reset", :class => "btn btn-danger"

    %a{:class => "btn btn-danger", :title => "delete #{@user.firstname}", :href => admin_user_path(@user), :data => {:method => :delete, :confirm => "Are you sure you want to remove user '#{@user.firstname}' from the system?" }}
      Delete user

%p
  %a{:href => admin_usermanagement_index_path }
    Back<commit_msg>Fixed name<commit_after>%input{:type => :hidden, :id =>'page_identifier', :value => "admin/users.#{@user.id}.edit"}

%h1
  ="Admin user edit - #{@user.firstname} #{@user.lastname}"

=form_for :user, :url => admin_user_path(@user), :html => { :method => :put } do |form|
  %p
    = label :user, :firstname
    = form.text_field :firstname
  %p
    = label :user, :lastname
    = form.text_field :lastname
  %p
    = label :user, :email
    = form.text_field :email
  %p
    = label :user, :role
    = form.select :role, options_for_select([['student', 0], ['supervisor', 1], ['admin', 2]], @user.role)
  %p
    = label :user, :notify_by_email
    = form.check_box :notify_by_email
  %p
    = form.submit "Update user", :class => "btn btn-primary"

  %p.danger
    %h3 Danger area
    = form.submit "Send password reset", :class => "btn btn-danger"

    %a{:class => "btn btn-danger", :title => "delete #{@user.firstname}", :href => admin_user_path(@user), :data => {:method => :delete, :confirm => "Are you sure you want to remove user '#{@user.firstname}' from the system?" }}
      Delete user

%p
  %a{:href => admin_usermanagement_index_path }
    Back
{'fraction_non_alphanumeric': 0.18304936653560508, 'fraction_numerical': 0.00436871996505024, 'mean_word_length': 3.654471544715447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6522667', 'n_tokens_mistral': 831, 'n_tokens_neox': 813, 'n_words': 211}