<commit_before><div class="main">
  <h1><%= _('Edit profile') %></h1>

  <p>
    <%= _("Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.") %>
  </p>

  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "roadmap-form white_background"}) do |f| %>
      <!-- Edit Profile -->
      <fieldset class="side-by-side">
        <legend><%= _('You can edit any of the details below.') %></legend>
        
        <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %>

        <div>
          <%= f.label :email, _('Email') + " *" %>
          <%= f.email_field :email, as: :email, class: "input-medium has-tooltip",
                             "data-toggle": "tooltip", "data-trigger": "focus", 
                            "title": _('Please enter your current password below when changing your email address.') %>
        </div>
        <div>
          <%= f.label :firstname, _('First name')+ " *" %>
          <%= f.text_field :firstname, as: :string,
                            id: "first_time_login_firstname",
                            autofocus: true,
                            class: "input-medium has-tooltip",
                            "data-toggle" => "tooltip",
                            "data-trigger" => "focus" ,
                            "title" => _('Please enter your first name.') %>
        </div>
        <div>
          <%= f.label :surname, _('Last name') + " *" %>
          <%= f.text_field :surname, as: :string, id: "first_time_login_surname",
                    class: "input-medium has-tooltip", "data-toggle" => "tooltip",
                    "data-trigger" => "focus" ,
                    "title" => _('Please enter your surname or family name.') %>
        </div>
        <div>
          <%= f.label :org, _('Organisation') + " *" %>
          <%= render partial: "shared/accessible_combobox", 
                     locals: {name: "#{resource_name}[org_name]",
                              id: "#{resource_name}_org_name",
                              default_selection: @default_org,
                              models: @orgs,
                              attribute: 'name',
                              classes: 'fixed-width-large'} %>
        </div>
        
        <% if MANY_LANGUAGES %>
          <div>
            <% lang = current_user.language.nil? ? FastGettext.default_locale : current_user.language.abbreviation %>
            <%= f.label :language, _('Language') %>
            <select id="user_language_id" name="user[language_id]" 
                    class="input-medium">
              <%= @languages.each do |l| %>
                <option value="<%= l.id %>"<%= lang == l.abbreviation ? ' selected="selected"' : '' %>>
                  <%= l.name %>
                </option>
              <% end %>
            </select>
          </div>
        <% end %>

        <% @identifier_schemes.each do |scheme| %>
          <div>
            <label><%= scheme.name %></label>
            <div class="identifier-scheme identifier-scheme-indent">
              <%= render partial: 'external_identifier', 
                         locals: {scheme: scheme, 
                                  id: current_user.identifier_for(scheme)} %>
            </div>
          </div>
        <% end %>

        <% if Rails.application.config.shibboleth_enabled %>
          <div>
            <label><%= _('Link to your institution') %></label>
            <% if resource.shibboleth_id.nil? || resource.shibboleth_id.length == 0 then %>
              <%= link_to _('Link your %{application_name} account to your institutional credentials (UK users only)') % { :application_name => user_omniauth_shibboleth_path }, class: "a-orange" %>
            <% else %>
                <%= _('Your account is linked to your institutional credentials.') %>
                <a id="unlink-shibboleth-button" data-toggle="modal" href="#unlink-institutional-credentials-dialog">
                    <%= _('Unlink your institutional credentials')%>
                </a>
            <% end %>
          </div>
        <% end %>
      
        <% unless @user.api_token.blank? %>
          <div>
            <%= f.label :api_token, _('API token') %>
            <div class="input-medium"><%= @user.api_token %></div>
          
            <label><%= _('API Information') %></label>
            <div><%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%></div>
          </div>
        <% end %>

        <br />
       
        <legend><%= _('If you would like to change your password please complete the following fields.') %></legend>

        <div>
          <%= f.label :current_password,  _('Current password') %>
          <%= f.password_field :current_password, as: :password, class: 'input-medium' %><commit_msg>removed old shib handler from edit profile page<commit_after><div class="main">
  <h1><%= _('Edit profile') %></h1>

  <p>
    <%= _("Please note that your email address is used as your username. If you change this, remember to use your new email address on sign in.") %>
  </p>

  <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {method: :put, class: "roadmap-form white_background"}) do |f| %>
      <!-- Edit Profile -->
      <fieldset class="side-by-side">
        <legend><%= _('You can edit any of the details below.') %></legend>
        
        <%= hidden_field_tag :unlink_flag, "false", id: "unlink_flag" %>

        <div>
          <%= f.label :email, _('Email') + " *" %>
          <%= f.email_field :email, as: :email, class: "input-medium has-tooltip",
                             "data-toggle": "tooltip", "data-trigger": "focus", 
                            "title": _('Please enter your current password below when changing your email address.') %>
        </div>
        <div>
          <%= f.label :firstname, _('First name')+ " *" %>
          <%= f.text_field :firstname, as: :string,
                            id: "first_time_login_firstname",
                            autofocus: true,
                            class: "input-medium has-tooltip",
                            "data-toggle" => "tooltip",
                            "data-trigger" => "focus" ,
                            "title" => _('Please enter your first name.') %>
        </div>
        <div>
          <%= f.label :surname, _('Last name') + " *" %>
          <%= f.text_field :surname, as: :string, id: "first_time_login_surname",
                    class: "input-medium has-tooltip", "data-toggle" => "tooltip",
                    "data-trigger" => "focus" ,
                    "title" => _('Please enter your surname or family name.') %>
        </div>
        <div>
          <%= f.label :org, _('Organisation') + " *" %>
          <%= render partial: "shared/accessible_combobox", 
                     locals: {name: "#{resource_name}[org_name]",
                              id: "#{resource_name}_org_name",
                              default_selection: @default_org,
                              models: @orgs,
                              attribute: 'name',
                              classes: 'fixed-width-large'} %>
        </div>
        
        <% if MANY_LANGUAGES %>
          <div>
            <% lang = current_user.language.nil? ? FastGettext.default_locale : current_user.language.abbreviation %>
            <%= f.label :language, _('Language') %>
            <select id="user_language_id" name="user[language_id]" 
                    class="input-medium">
              <%= @languages.each do |l| %>
                <option value="<%= l.id %>"<%= lang == l.abbreviation ? ' selected="selected"' : '' %>>
                  <%= l.name %>
                </option>
              <% end %>
            </select>
          </div>
        <% end %>

        <% @identifier_schemes.each do |scheme| %>
          <div>
            <label><%= scheme.name %></label>
            <div class="identifier-scheme identifier-scheme-indent">
              <%= render partial: 'external_identifier', 
                         locals: {scheme: scheme, 
                                  id: current_user.identifier_for(scheme)} %>
            </div>
          </div>
        <% end %>

        <% unless @user.api_token.blank? %>
          <div>
            <%= f.label :api_token, _('API token') %>
            <div class="input-medium"><%= @user.api_token %></div>
          
            <label><%= _('API Information') %></label>
            <div><%= link_to( _('How to use the API'), controller: "token_permission_types", action: "index")%></div>
          </div>
        <% end %>

        <br />
       
        <legend><%= _('If you would like to change your password please complete the following fields.') %></legend>

        <div>
          <%= f.label :current_password,  _('Current password') %>
          <%= f.password_field :current_password, as: :password, class: 'input-medium' %>
{'fraction_non_alphanumeric': 0.15787159190853123, 'fraction_numerical': 0.0005496921723834653, 'mean_word_length': 1.6498689193125546, 'pattern_counts': {'":': 6, '<': 170, '<?xml version=': 0, '>': 183, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4813649', 'n_tokens_mistral': 2702, 'n_tokens_neox': 2482, 'n_words': 604}