<commit_before><div id="role_switch_text">
  <% form_tag login_as_main_index_path(), {:method => 'post', :remote => true} do %>
    <div id="role_switch_error"><span>&nbsp;</span></div>
    <h2>
      <%= I18n.t(:switch_role)%>
    </h2>
    <%= label_tag 'effective_user_login', I18n.t(:login_as) -%>
    <%= text_field_tag 'effective_user_login', nil, :tabindex => 10 %><br />
    <%
      # For REMOTE_USER we have no way to check a password, so don't
      # provide UI for entering it.
    %>
    <% if !MarkusConfigurator.markus_config_remote_user_auth %>
      <%= label_tag 'admin_password', I18n.t(:admin_password) %>
      <%= password_field_tag 'admin_password', nil, :tabindex => 20 %>
    <% end %>
    <br />
    <%= submit_tag I18n.t(:log_in), :disable_with => I18n.t(:logging_in), :tabindex => 100, :class => 'button indent_button'%>
    <%= button_to_function "Cancel", 'role_switch_modal.close()', :tabindex => 110 %>
  <% end %>
  <script>
    $('effective_user_login').focus();
    role_switch_modal.open();
  </script>
</div><commit_msg>Fix issue-658, login input now gets focus when opening the "switch role" modal<commit_after><div id="role_switch_text">
  <% form_tag login_as_main_index_path(), {:method => 'post', :remote => true} do %>
    <div id="role_switch_error"><span>&nbsp;</span></div>
    <h2>
      <%= I18n.t(:switch_role)%>
    </h2>
    <%= label_tag 'effective_user_login', I18n.t(:login_as) -%>
    <%= text_field_tag 'effective_user_login', nil, :tabindex => 10 %><br />
    <%
      # For REMOTE_USER we have no way to check a password, so don't
      # provide UI for entering it.
    %>
    <% if !MarkusConfigurator.markus_config_remote_user_auth %>
      <%= label_tag 'admin_password', I18n.t(:admin_password) %>
      <%= password_field_tag '<PASSWORD>', nil, :tabindex => 20 %>
    <% end %>
    <br />
    <%= submit_tag I18n.t(:log_in), :disable_with => I18n.t(:logging_in), :tabindex => 100, :class => 'button indent_button'%>
    <%= button_to_function "Cancel", 'role_switch_modal.close()', :tabindex => 110 %>
  <% end %>
  <script>
    role_switch_modal.open();
    $('effective_user_login').focus();
  </script>
</div>
{'fraction_non_alphanumeric': 0.18465778594395957, 'fraction_numerical': 0.021589343132751494, 'mean_word_length': 3.883408071748879, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 68, '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': '6191961', 'n_tokens_mistral': 852, 'n_tokens_neox': 774, 'n_words': 155}