<commit_before><%unless @user.new_record?%>
<p>Please update any info regarding your account.</p>
<h5>Name</h5>
<hr/>
<%end%>

<% errors = @user.errors[:login_id] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class %>">
  <%= f.label :login_id, 'Username', :class => 'control-label' %>
  <div class="controls">
    <%= f.text_field :login_id, readonly: !@user.new_record?, :class => "input-xxlarge" %>
    <span class="help-inline">
      <%= errors.join (', ') %>
    </span>
  </div>
</div>

<% unless @user.new_record? %>
  <% errors = @user.errors[:first_name] %>
  <% validation_class = errors.empty? ? {} : 'error' %>
  <div class="control-group <%= validation_class %>">
    <%= f.label :first_name, :class => 'control-label' %>
    <div class="controls">
      <%= f.text_field :first_name, :class => "input-xxlarge" %>
      <span class="help-inline">
        <%= errors.join (', ') %>
      </span>
    </div>
  </div>

  <% errors = @user.errors[:last_name] %>
  <% validation_class = errors.empty? ? {} : 'error' %>
  <div class="control-group <%= validation_class %>">
    <%= f.label :last_name, :class => 'control-label' %>
    <div class="controls">
      <%= f.text_field :last_name, :class => "input-xxlarge" %>
        <span class="help-in-line">
          <%=errors.join (', ')%>
      </span>
    </div>
  </div>
<%end%>

<% errors = @user.errors[:password] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class %>">
  <%= f.label :password, password_label(@user), :class => 'control-label' %>
  <div class="controls">
    <%= f.password_field :password, :class => "input-xxlarge", disabled: session[:login_method] == '<PASSWORD>' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
    </span>
  </div>
</div>

<% errors = @user.errors[:password_confirmation] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group  <%= validation_class %>">
  <%= f.label :password_confirmation, :class => 'control-label' %>
  <div class="controls">
    <%= f.password_field :password_confirmation, :class => "input-xxlarge", disabled: session[:login_method] == 'shibboleth' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
    </span>
  </div>
</div>

<%unless @user.new_record?%>
<h5>Contact Information</h5>
<hr/>
<%end%>

<% errors = @user.errors[:email] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class%>">
  <%= f.label :email, :class => 'control-label' %>
  <div class="controls">
    <%= f.text_field :email, :class => 'input-xxlarge' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
      </span>
  </div>
</div>

<% errors = @user.errors[:institution_id] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group  <%= validation_class %>">
  <%= f.label :institution_id, :class => 'control-label' %>
  <div class="controls">
    <% # filter institution list in my profile page only %>
    <% if @user.new_record? %>
      <%= collection_select(:user, :institution_id, Institution.all, :id, :full_name, { prompt: "-Select an Institution-"}, :class => "input-xxlarge") %>
    <% else %>
      <%= f.select( :institution_id, @institution_list, {prompt: 'Select Institution'}, :class => "input-xxlarge")%>
    <% end %>

    <span class="help-in-line">
      <%=errors.join (', ')%>
    </span>
  </div>
</div>

<% unless @user.new_record? %>
  <h5>DMP Options</h5>
	<hr/>
  <div class="control-group">
    <%= label_tag :my_roles, 'My Roles', :class => 'control-label' %>
    <div class="controls">
      <%= text_field_tag(:my_roles, "My Roles", value: @roles, disabled: true, :class => "input-xxlarge") %>
    </div>
  </div>
<% end %>
<commit_msg>my profile page display roles<commit_after><%unless @user.new_record?%>
<p>Please update any info regarding your account.</p>
<h5>Name</h5>
<hr/>
<%end%>

<% errors = @user.errors[:login_id] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class %>">
  <%= f.label :login_id, 'Username', :class => 'control-label' %>
  <div class="controls">
    <%= f.text_field :login_id, readonly: !@user.new_record?, :class => "input-xxlarge" %>
    <span class="help-inline">
      <%= errors.join (', ') %>
    </span>
  </div>
</div>

<% unless @user.new_record? %>
  <% errors = @user.errors[:first_name] %>
  <% validation_class = errors.empty? ? {} : 'error' %>
  <div class="control-group <%= validation_class %>">
    <%= f.label :first_name, :class => 'control-label' %>
    <div class="controls">
      <%= f.text_field :first_name, :class => "input-xxlarge" %>
      <span class="help-inline">
        <%= errors.join (', ') %>
      </span>
    </div>
  </div>

  <% errors = @user.errors[:last_name] %>
  <% validation_class = errors.empty? ? {} : 'error' %>
  <div class="control-group <%= validation_class %>">
    <%= f.label :last_name, :class => 'control-label' %>
    <div class="controls">
      <%= f.text_field :last_name, :class => "input-xxlarge" %>
        <span class="help-in-line">
          <%=errors.join (', ')%>
      </span>
    </div>
  </div>
<%end%>

<% errors = @user.errors[:password] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class %>">
  <%= f.label :password, password_label(@user), :class => 'control-label' %>
  <div class="controls">
    <%= f.password_field :password, :class => "input-xxlarge", disabled: session[:login_method] == '<PASSWORD>' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
    </span>
  </div>
</div>

<% errors = @user.errors[:password_confirmation] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group  <%= validation_class %>">
  <%= f.label :password_confirmation, :class => 'control-label' %>
  <div class="controls">
    <%= f.password_field :password_confirmation, :class => "input-xxlarge", disabled: session[:login_method] == '<PASSWORD>' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
    </span>
  </div>
</div>

<%unless @user.new_record?%>
<h5>Contact Information</h5>
<hr/>
<%end%>

<% errors = @user.errors[:email] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group <%= validation_class%>">
  <%= f.label :email, :class => 'control-label' %>
  <div class="controls">
    <%= f.text_field :email, :class => 'input-xxlarge' %>
      <span class="help-in-line">
        <%=errors.join (', ')%>
      </span>
  </div>
</div>

<% errors = @user.errors[:institution_id] %>
<% validation_class = errors.empty? ? {} : 'error' %>
<div class="control-group  <%= validation_class %>">
  <%= f.label :institution_id, :class => 'control-label' %>
  <div class="controls">
    <% # filter institution list in my profile page only %>
    <% if @user.new_record? %>
      <%= collection_select(:user, :institution_id, Institution.all, :id, :full_name, { prompt: "-Select an Institution-"}, :class => "input-xxlarge") %>
    <% else %>
      <%= f.select( :institution_id, @institution_list, {prompt: 'Select Institution'}, :class => "input-xxlarge")%>
    <% end %>

    <span class="help-in-line">
      <%=errors.join (', ')%>
    </span>
  </div>
</div>

<% unless @user.new_record? %>
  <h5>DMP Options</h5>
	<hr/>
  <div class="control-group">
    <%= label_tag :my_roles, 'My Roles', :class => 'control-label' %>
    <div class="controls">
      <%#= text_field_tag(:my_roles, "My Roles", value: @roles, disabled: true, :class => "input-xxlarge") %>
      <%= @user.role_names.join(' | ') %>
    </div>
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.2308589195491644, 'fraction_numerical': 0.001554605518849592, 'mean_word_length': 3.6674727932285367, 'pattern_counts': {'":': 0, '<': 235, '<?xml version=': 0, '>': 269, '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': '3498621', 'n_tokens_mistral': 2915, 'n_tokens_neox': 2684, 'n_words': 511}