<commit_before><%= form_for @adopter, html: { class: 'form-horizontal edit-adopter' } do |f| %>
  <table class="table table-striped table-bordered table-condensed">
    <tr>
      <td colspan="2">
        <% if @adopter.adoption_app.has_family_under_18 == true %>
          <span class="label label-warning">Has Family Under 18</span>
        <% end %>

        <% if @adopter.adoption_app.is_ofage == false %>
          <span class="label label-warning">Under 21</span>
        <% end %>

        <% if @adopter.adoption_app.pets_branch == "no_pets" && @adopter.adoption_app.prev_pets_type.blank? %>
          <span class="label label-warning">First Time Pet Owner</span>
        <% elsif (@adopter.adoption_app.prev_pets_type == "Cats" || @adopter.adoption_app.prev_pets_type == "None") && (@adopter.adoption_app.current_pets_type == "Cats" || @adopter.adoption_app.current_pets_type == "None") && @adopter.dog_or_cat == "Dog" %>
          <span class="label label-warning">First Time Dog Owner</span>
        <% elsif (@adopter.adoption_app.prev_pets_type == "Dogs" || @adopter.adoption_app.prev_pets_type == "None") && (@adopter.adoption_app.current_pets_type == "Dogs" || @adopter.adoption_app.current_pets_type == "None") && @adopter.dog_or_cat == "Cat"%>
          <span class="label label-warning">First Time Cat Owner</span>
        <% end %>

        <%= max_hours_alone_label(@adopter.adoption_app.max_hrs_alone) %>

        <% if @adopter.adoption_app.current_pets_fixed == false %>
          <span class="label label-important">Current Pets not Fixed</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_fixed == true %>
          <span class="label label-success">Current Pets Fixed</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_uptodate == false %>
          <span class="label label-important">Current Pets Need Shots</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_uptodate == true %>
          <span class="label label-success">Current Pets Up to Date</span>
        <% end %>

        <% if @adopter.adoption_app.house_type == "own" %>
          <span class="label label-success">Owns Home </span>
        <% end %>
      </td>
    </tr>
    <tr>
      <th align="right">Application Submitted</th>
      <td><%= time_ago_in_words(@adopter.created_at) %> ago</td>
    </tr>
    <tr>
      <th>Name</th>
      <td>
        <div class='read-only'><%= @adopter.name %></div>
        <div class='editable'><%= f.text_field :name %></div>
      </td>
    </tr>
    <tr>
      <th>E-mail</th>
      <td>
        <div class='read-only'><%= @adopter.email %></div>
        <div class='editable'><%= f.text_field :email %></div>
      </td>
    </tr>
    <tr>
      <th>Secondary E-mail</th>
      <td>
        <div class='read-only'><%= @adopter.secondary_email %></div>
        <div class='editable'><%= f.text_field :secondary_email %></div>
      </td>
    </tr>
    <tr>
      <th>Primary Phone</th>
      <td>
        <div class='read-only'><span class="tel value"><%= @adopter.phone %></span></div>
        <div class='editable'><%= f.text_field :phone %></div>
      </td>
    </tr>
      <tr>
        <th>Other Phone</th>
        <td>
          <div class='read-only'><span class="tel value"><%= @adopter.other_phone %><span></div>
          <div class='editable'><%= f.text_field :other_phone %></div>
        </td>
      </tr>
    <tr>
      <th>Best Time to Call</th>
      <td>
        <div class='read-only'><span class="tel value"><%= @adopter.when_to_call %><span></div>
        <div class='editable'><%= f.text_field :when_to_call %></div>
      </td>
    </tr>
      <%= f.fields_for :adoption_app do |af|%>
    <tr>
      <th>Spouse's Name</th>
      <td>
        <div class='read-only'><%= af.object.spouse_name %></div>
        <div class='editable'><%= af.text_area :spouse_name %></div>
      </td>
    </tr>
    <tr>
      <th>Others in Household</th>
      <td>
        <div class='read-only'><%= af.object.other_household_names %></div>
        <div class='editable'><%= af.text_area :other_household_names %></div>
      </td>
    <tr>
      <th>
        Heard about us from
      </th>
      <td>
        <div class='read-only'><%= af.object.how_did_you_hear %></div>
        <div class='editable'><%= af.text_area :how_did_you_hear %></div>
      </td>
    </tr>
      <% end %>
    </tr>
    <% if @adopter.adoption_app.verify_home_auth == true %>
    <tr>
      <th></th>
      <td>Authorized to verify home ownership</td>
    </tr>
    <% end %>
    <tr>
      <th>Street Address</th>
      <td>
        <div class="editable mb-5"><%= f.text_field :address1 %></div>
        <div class="read-only mb-5"><%= @adopter.address1 %></div>
        <div class="editable"><%= f.text_field :address2 %></div>
        <div class="read-only"><%= @adopter.address2 %></div>
      </td>
    </tr>
    <tr>
      <th>City</th>
      <td>
        <div class="editable"><%= f.text_field :city%></div>
        <div class="read-only"><%= @adopter.city %></div>
      </td>
    </tr>
    <tr>
      <th>State</th>
      <td>
        <div class="editable"><%= f.text_field :state%></div>
        <div class="read-only"><%= @adopter.state %></div>
      </td>
    </tr>
    <tr>
      <th>Zip</th>
      <td>
        <div class="editable"><%= f.text_field :zip%></div>
        <div class="read-only"><%= @adopter.zip %></div>
      </td>
    </tr>
    <tr>
      <th>County</th>
      <td>
        <div class="editable"><%= @adopter.county %></div>
        <div class="read-only"><%= @adopter.county %></div>
      </td>
    </tr>
    <tr>
      <th>Valid Address?</th>
      <td>
        <div class="editable">
          <%= f.label '' do %>
            <%= f.radio_button :is_address_valid, true, id: 'validaddress'%> Yes
          <% end %>
          <%= f.label '' do %>
            <%= f.radio_button :is_address_valid, false, id: 'invalidaddress'%> No
          <% end %>
        </div>
        <div class="read-only" id="addressvalidator">
          <% if @adopter.is_address_valid == true %>
            Yes
          <% else %>
            No
          <% end %>
        </div>
      </td>
    </tr>
    <% if @adopter.adoption_app.birth_date %>
    <tr>
      <th>
        Date of Birth
      </th>
      <td><%= @adopter.adoption_app.birth_date %></td>
    </tr>
    <% end %>
    <% if @adopter.adoption_app.adopter_age %>
      <tr>
        <th>
         Adopter Age
        </th>
        <td><%= @adopter.adoption_app.adopter_age %></td>
      </tr>
    <% end %>
    <tr>
      <td colspan="2">
        <a id="toggle-edit" class="btn btn-primary">Edit Info</a>
        <%= f.submit "Save Info", class: "btn adopter-save", disabled: "disabled" %>
      </td>
    </tr>
  </table>
<% end %>

<hr class="separator">

<%= form_for @adopter, html: { class: 'form-horizontal' } do |f| %>
  <table class="table-striped table-bordered table-condensed">
    <tr>
      <th>
        Assigned To:
      </th>
      <td>
        <%= f.select(:assigned_to_user_id, [['No One', nil]].concat( @adopter_users.collect {|u| [u.name, u.id] }), {}, { class: 'input-medium' }) %>
      </td>
    </tr>
    <tr>
      <th>Status <a href="/status_definitions" class="btn" target="_blank">?</a><commit_msg>edit or add dob to adopter<commit_after><%= form_for @adopter, html: { class: 'form-horizontal edit-adopter' } do |f| %>
  <table class="table table-striped table-bordered table-condensed">
    <tr>
      <td colspan="2">
        <% if @adopter.adoption_app.has_family_under_18 == true %>
          <span class="label label-warning">Has Family Under 18</span>
        <% end %>

        <% if @adopter.adoption_app.is_ofage == false %>
          <span class="label label-warning">Under 21</span>
        <% end %>

        <% if @adopter.adoption_app.pets_branch == "no_pets" && @adopter.adoption_app.prev_pets_type.blank? %>
          <span class="label label-warning">First Time Pet Owner</span>
        <% elsif (@adopter.adoption_app.prev_pets_type == "Cats" || @adopter.adoption_app.prev_pets_type == "None") && (@adopter.adoption_app.current_pets_type == "Cats" || @adopter.adoption_app.current_pets_type == "None") && @adopter.dog_or_cat == "Dog" %>
          <span class="label label-warning">First Time Dog Owner</span>
        <% elsif (@adopter.adoption_app.prev_pets_type == "Dogs" || @adopter.adoption_app.prev_pets_type == "None") && (@adopter.adoption_app.current_pets_type == "Dogs" || @adopter.adoption_app.current_pets_type == "None") && @adopter.dog_or_cat == "Cat"%>
          <span class="label label-warning">First Time Cat Owner</span>
        <% end %>

        <%= max_hours_alone_label(@adopter.adoption_app.max_hrs_alone) %>

        <% if @adopter.adoption_app.current_pets_fixed == false %>
          <span class="label label-important">Current Pets not Fixed</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_fixed == true %>
          <span class="label label-success">Current Pets Fixed</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_uptodate == false %>
          <span class="label label-important">Current Pets Need Shots</span>
        <% end %>

        <% if @adopter.adoption_app.current_pets_uptodate == true %>
          <span class="label label-success">Current Pets Up to Date</span>
        <% end %>

        <% if @adopter.adoption_app.house_type == "own" %>
          <span class="label label-success">Owns Home </span>
        <% end %>
      </td>
    </tr>
    <tr>
      <th align="right">Application Submitted</th>
      <td><%= time_ago_in_words(@adopter.created_at) %> ago</td>
    </tr>
    <tr>
      <th>Name</th>
      <td>
        <div class='read-only'><%= @adopter.name %></div>
        <div class='editable'><%= f.text_field :name %></div>
      </td>
    </tr>
    <tr>
      <th>E-mail</th>
      <td>
        <div class='read-only'><%= @adopter.email %></div>
        <div class='editable'><%= f.text_field :email %></div>
      </td>
    </tr>
    <tr>
      <th>Secondary E-mail</th>
      <td>
        <div class='read-only'><%= @adopter.secondary_email %></div>
        <div class='editable'><%= f.text_field :secondary_email %></div>
      </td>
    </tr>
    <tr>
      <th>Primary Phone</th>
      <td>
        <div class='read-only'><span class="tel value"><%= @adopter.phone %></span></div>
        <div class='editable'><%= f.text_field :phone %></div>
      </td>
    </tr>
      <tr>
        <th>Other Phone</th>
        <td>
          <div class='read-only'><span class="tel value"><%= @adopter.other_phone %><span></div>
          <div class='editable'><%= f.text_field :other_phone %></div>
        </td>
      </tr>
    <tr>
      <th>Best Time to Call</th>
      <td>
        <div class='read-only'><span class="tel value"><%= @adopter.when_to_call %><span></div>
        <div class='editable'><%= f.text_field :when_to_call %></div>
      </td>
    </tr>
  <%= f.fields_for :adoption_app do |af|%>
    <tr>
      <th>Spouse's Name</th>
      <td>
        <div class='read-only'><%= af.object.spouse_name %></div>
        <div class='editable'><%= af.text_area :spouse_name %></div>
      </td>
    </tr>
    <tr>
      <th>Others in Household</th>
      <td>
        <div class='read-only'><%= af.object.other_household_names %></div>
        <div class='editable'><%= af.text_area :other_household_names %></div>
      </td>
    <tr>
      <th>
        Heard about us from
      </th>
      <td>
        <div class='read-only'><%= af.object.how_did_you_hear %></div>
        <div class='editable'><%= af.text_area :how_did_you_hear %></div>
      </td>
    </tr>
    <tr>
      <th>
        Date of Birth
      </th>
      <td>
        <div class="read-only"><%= af.object.birth_date unless af.object.birth_date.blank? %></div>
        <div class="editable"><%= af.text_field :birth_date %></div>
      </td>
    </tr>
    <% end %>
    <% if @adopter.adoption_app.adopter_age %>
      <tr>
        <th>
        Adopter Age
        </th>
        <td><%= @adopter.adoption_app.adopter_age %></td>
      </tr>
  <% end %>
    </tr>
    <% if @adopter.adoption_app.verify_home_auth == true %>
    <tr>
      <th></th>
      <td>Authorized to verify home ownership</td>
    </tr>
    <% end %>
    <tr>
      <th>Street Address</th>
      <td>
        <div class="editable mb-5"><%= f.text_field :address1 %></div>
        <div class="read-only mb-5"><%= @adopter.address1 %></div>
        <div class="editable"><%= f.text_field :address2 %></div>
        <div class="read-only"><%= @adopter.address2 %></div>
      </td>
    </tr>
    <tr>
      <th>City</th>
      <td>
        <div class="editable"><%= f.text_field :city%></div>
        <div class="read-only"><%= @adopter.city %></div>
      </td>
    </tr>
    <tr>
      <th>State</th>
      <td>
        <div class="editable"><%= f.text_field :state%></div>
        <div class="read-only"><%= @adopter.state %></div>
      </td>
    </tr>
    <tr>
      <th>Zip</th>
      <td>
        <div class="editable"><%= f.text_field :zip%></div>
        <div class="read-only"><%= @adopter.zip %></div>
      </td>
    </tr>
    <tr>
      <th>County</th>
      <td>
        <div class="editable"><%= @adopter.county %></div>
        <div class="read-only"><%= @adopter.county %></div>
      </td>
    </tr>
    <tr>
      <th>Valid Address?</th>
      <td>
        <div class="editable">
          <%= f.label '' do %>
            <%= f.radio_button :is_address_valid, true, id: 'validaddress'%> Yes
          <% end %>
          <%= f.label '' do %>
            <%= f.radio_button :is_address_valid, false, id: 'invalidaddress'%> No
          <% end %>
        </div>
        <div class="read-only" id="addressvalidator">
          <% if @adopter.is_address_valid == true %>
            Yes
          <% else %>
            No
          <% end %>
        </div>
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <a id="toggle-edit" class="btn btn-primary">Edit Info</a>
        <%= f.submit "Save Info", class: "btn adopter-save", disabled: "disabled" %>
      </td>
    </tr>
  </table>
<% end %>

<hr class="separator">

<%= form_for @adopter, html: { class: 'form-horizontal' } do |f| %>
  <table class="table-striped table-bordered table-condensed">
    <tr>
      <th>
        Assigned To:
      </th>
      <td>
        <%= f.select(:assigned_to_user_id, [['No One', nil]].concat( @adopter_users.collect {|u| [u.name, u.id] }), {}, { class: 'input-medium' }) %>
      </td>
    </tr>
    <tr>
      <th>Status <a href="/status_definitions" class="btn" target="_blank">?</a>
{'fraction_non_alphanumeric': 0.19875945743303114, 'fraction_numerical': 0.0019085270261059233, 'mean_word_length': 2.303760414321099, 'pattern_counts': {'":': 0, '<': 610, '<?xml version=': 0, '>': 610, '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': '920129', 'n_tokens_mistral': 5499, 'n_tokens_neox': 5214, 'n_words': 1013}