<commit_before><nav class="wizard-container">
  <ul class="wizard-nav">
    <li>
      <a href="#demographic">Demographic Information
        <div class="check">
          <div class="circle"></div>
        </div>
        <div class="progress-line pull-right"></div>
      </a>
    </li>
    <li>
      <a href="#household">Household Information
        <div class="check">
          <div class="circle"></div>
        </div>
        <div class="progress-line pull-left"></div>
        <div class="progress-line pull-right"></div>
      </a>
    </li>
    <li>
    <a href="#residential">Residential History
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#income">Income and Employment
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#criminal">Criminal History
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#other">Other Information
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
    </a>
  </li>
</ul>
</nav>

<%= bootstrap_form_for(applicant, remote: true) do |f| %>
  <%
    section_names = %w(
      demographic
      household
      residential
      income
      criminal
      other
    )
    section_names.each_with_index do |section_name, index| %>
      <div id="<%=section_name%>" class="section hide">
        <%= render "main_form/#{section_name}_section", builder: f, applicant: applicant %>
      <hr />
      <%= f.button("Update", { id: "update-button", class:"btn btn-default" }) %>
      <hr />
      <%= render("section_buttons",
                 next_section: section_names[index + 1],
                 previous_section: (section_names[index - 1] if index > 0)) %>
    </div>
  <% end %>
<% end %>
<hr />

<div id="download">
  <%= button_to 'Download forms', "/download", { class:"btn btn-default btn-lg download-forms", id: 'download-button'  } %>
  <%= content_for :javascript do %>
    <%= javascript_tag do %>
      $("#download-button").click(function(){$("#update-button").submit();});
    <% end %>
  <% end %>
</div>
<div id="download-warning" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <h3><span class="glyphicon glyphicon-warning-sign"></span>Important!</h3>
        </div>
      <div class="modal-body">
        <div class="well alert-danger">Remember to proofread the forms for completeness and accuracy after you download them. Do not sign the forms as you will need to do so in front of the building management upon submission.</div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Ok</button><commit_msg>Doesn't download if ajaxErrors, but currently prevents dialogue from opening.<commit_after><nav class="wizard-container">
  <ul class="wizard-nav">
    <li>
      <a href="#demographic">Demographic Information
        <div class="check">
          <div class="circle"></div>
        </div>
        <div class="progress-line pull-right"></div>
      </a>
    </li>
    <li>
      <a href="#household">Household Information
        <div class="check">
          <div class="circle"></div>
        </div>
        <div class="progress-line pull-left"></div>
        <div class="progress-line pull-right"></div>
      </a>
    </li>
    <li>
    <a href="#residential">Residential History
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#income">Income and Employment
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#criminal">Criminal History
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
      <div class="progress-line pull-right"></div>
    </a>
  </li>
  <li>
    <a href="#other">Other Information
      <div class="check">
        <div class="circle"></div>
      </div>
      <div class="progress-line pull-left"></div>
    </a>
  </li>
</ul>
</nav>

<%= bootstrap_form_for(applicant, remote: true) do |f| %>
  <%
    section_names = %w(
      demographic
      household
      residential
      income
      criminal
      other
    )
    section_names.each_with_index do |section_name, index| %>
      <div id="<%=section_name%>" class="section hide">
        <%= render "main_form/#{section_name}_section", builder: f, applicant: applicant %>
      <hr />
      <%= f.button("Update", { id: "update-button", class:"btn btn-default" }) %>
      <hr />
      <%= render("section_buttons",
                 next_section: section_names[index + 1],
                 previous_section: (section_names[index - 1] if index > 0)) %>
    </div>
  <% end %>
<% end %>
<hr />

<div id="download">
  <%= button_to 'Download forms', "/download", { class:"btn btn-default btn-lg download-forms", id: 'download-button'  } %>
  <%= content_for :javascript do %>
    <%= javascript_tag do %>
      $("#download-button").click(function(e){
        $("#update-button").submit();
        var update = true;
        if ($(document).ajaxError()){
          var update = false;
        }
        if (!update){e.preventDefault();}
      });
    <% end %>
  <% end %>
</div>
<div id="download-warning" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <h3><span class="glyphicon glyphicon-warning-sign"></span>Important!</h3>
        </div>
      <div class="modal-body">
        <div class="well alert-danger">Remember to proofread the forms for completeness and accuracy after you download them. Do not sign the forms as you will need to do so in front of the building management upon submission.</div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Ok</button>
{'fraction_non_alphanumeric': 0.18107121119902617, 'fraction_numerical': 0.0015216068167985392, 'mean_word_length': 2.5957330415754925, 'pattern_counts': {'":': 0, '<': 219, '<?xml version=': 0, '>': 221, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3084369', 'n_tokens_mistral': 2100, 'n_tokens_neox': 2015, 'n_words': 481}