<commit_before><%= simple_form_for @user, :html => { :class => "form-horizontal" } do |f| %>
  <%= f.error_notification %>

  <% if @can_edit_username %>
    <%= f.input :username %>
  <% else %>
      <%= f.input :username, :readonly => true, :input_html => {:value => @user.username}%>
  <% end %>

  <%= f.input :first_name %>
  <%= f.input :last_name %>
  <%= f.input :nickname %>
  <% if AppConfig.first.require_phone %>
    <%= f.input :phone, required: true, hint: "format like (555) 555-5555" %>
  <% else %>
    <%= f.input :phone, hint: "format like (555) 555-5555" %>
  <% end %>
  <%= f.input :email %>
  <%= f.input :affiliation, hint: "including college, year, etc"%>

  <%= hidden_field_tag(:from_cart, false) %>
  <%= hidden_field_tag(:partial_to_render, 'form') %>

  <%= render partial: 'terms_of_service/user_accepted', locals: {f: f}%>

  <% if can? :manage, User %>
      <%# TODO: Make this a fancy box %>
      <%= f.association :requirements, :collection => Requirement.all.map{|req| [req.description,req.id]}, :label => "Requirements user has satisfied"%>
      <%= f.input :role, :collection => (can? :appoint, :superuser) ? ['normal', 'checkout', 'admin', 'superuser', 'banned'] : ['normal', 'checkout', 'admin', 'banned'], placeholder: 'normal' %>
  <% end %>

  <% if @user %>
    <%= f.button :wrapped, cancel: @user %>
  <% else %>
    <%= f.button :wrapped, cancel: root_path %>
  <% end %>

<% end %>
<commit_msg>add cas_auth conditionals to user form<commit_after><%= simple_form_for @user, :html => { :class => "form-horizontal" } do |f| %>
  <%= f.error_notification %>

  <% if @cas_auth %>
    <% if @can_edit_username %>
      <%= f.input :username %>
    <% else %>
        <%= f.input :username, :readonly => true, :input_html => {:value => @user.username}%>
    <% end %>
  <% else %>
    <%= f.input :email %>
    <%= f.input :password, required: true %>
    <%= f.input :password_confirmation, required: true %>
  <% end %>

  <%= f.input :first_name %>
  <%= f.input :last_name %>
  <%= f.input :nickname %>
  <% if AppConfig.first.require_phone %>
    <%= f.input :phone, required: true, hint: "format like (555) 555-5555" %>
  <% else %>
    <%= f.input :phone, hint: "format like (555) 555-5555" %>
  <% end %>
  <%= f.input :email if @cas_auth %>
  <%= f.input :affiliation, hint: "including college, year, etc"%>

  <%= hidden_field_tag(:from_cart, false) %>
  <%= hidden_field_tag(:partial_to_render, 'form') %>

  <%= render partial: 'terms_of_service/user_accepted', locals: {f: f}%>

  <% if can? :manage, User %>
      <%# TODO: Make this a fancy box %>
      <%= f.association :requirements, :collection => Requirement.all.map{|req| [req.description,req.id]}, :label => "Requirements user has satisfied"%>
      <%= f.input :role, :collection => (can? :appoint, :superuser) ? ['normal', 'checkout', 'admin', 'superuser', 'banned'] : ['normal', 'checkout', 'admin', 'banned'], placeholder: 'normal' %>
  <% end %>

  <% if @user %>
    <%= f.button :wrapped, cancel: @user %>
  <% else %>
    <%= f.button :wrapped, cancel: root_path %>
  <% end %>

<% end %>

{'fraction_non_alphanumeric': 0.21990369181380418, 'fraction_numerical': 0.012841091492776886, 'mean_word_length': 3.6438152011922504, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 87, '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': '1758429', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1079, 'n_words': 257}