<commit_before><%= form_for @appointment_summary, url: appointment_summaries_path(format: :pdf) do |f| %>
  <div class="page-header">
    <h1><%= title 'New appointment summary' %></h1>
  </div>

  <p class="lead">Use this form to enter the visitor's personal details provided during the guidance
    appointment and to issue a personalised record of guidance.</p>

  <% if @appointment_summary.errors.any? %>
    <div class="alert alert-danger" role="alert">
      <ul>
        <% @appointment_summary.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <h2>Visitor details</h2>

  <div class="form-group">
    <%= f.label :title %>
    <%= f.select :title, AppointmentSummary::TITLES,
                 { prompt: true }, { class: %w(form-control input-md-2 t-title) } %>
  </div>

  <div class="form-group">
    <%= f.label :first_name %>
    <%= f.text_field :first_name, class: %w(form-control input-md-3 t-first-name) %>
  </div>

  <div class="form-group">
    <%= f.label :last_name %>
    <%= f.text_field :last_name, class: %w(form-control input-md-3 t-last-name) %>
  </div>

  <h3>Appointment</h3>

  <div class="form-group">
    <%= f.label :date_of_appointment %>
    <%= f.date_field :date_of_appointment,
                     class: %w(form-control input-md-2 t-date-of-appointment) %>
  </div>

  <div class="form-group">
    <%= f.label :reference_number %>
    <%= f.text_field :reference_number, class: %w(form-control input-md-3 t-reference-number) %>
  </div>

  <h2>Guider details</h2>

  <div class="form-group">
    <%= f.label :guider_name, 'First name of guider' %>
    <%= f.text_field :guider_name, class: %w(form-control input-md-3 t-guider-name) %>
  </div>

  <div class="form-group">
    <fieldset>
      <legend>
        <span>Organisation:</span>
      </legend>

      <div class="radio">
        <%= f.label :guider_organisation, value: 'cab' do %>
          <%= f.radio_button :guider_organisation, 'cab',
                             class: 't-guider-organisation-cab' %>
          Citizens Advice
        <% end %>
      </div>

      <div class="radio">
        <%= f.label :guider_organisation, value: 'tpas' do %>
          <%= f.radio_button :guider_organisation, 'tpas',<commit_msg>Label booking reference number correctly<commit_after><%= form_for @appointment_summary, url: appointment_summaries_path(format: :pdf) do |f| %>
  <div class="page-header">
    <h1><%= title 'New appointment summary' %></h1>
  </div>

  <p class="lead">Use this form to enter the visitor's personal details provided during the guidance
    appointment and to issue a personalised record of guidance.</p>

  <% if @appointment_summary.errors.any? %>
    <div class="alert alert-danger" role="alert">
      <ul>
        <% @appointment_summary.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <h2>Visitor details</h2>

  <div class="form-group">
    <%= f.label :title %>
    <%= f.select :title, AppointmentSummary::TITLES,
                 { prompt: true }, { class: %w(form-control input-md-2 t-title) } %>
  </div>

  <div class="form-group">
    <%= f.label :first_name %>
    <%= f.text_field :first_name, class: %w(form-control input-md-3 t-first-name) %>
  </div>

  <div class="form-group">
    <%= f.label :last_name %>
    <%= f.text_field :last_name, class: %w(form-control input-md-3 t-last-name) %>
  </div>

  <h3>Appointment</h3>

  <div class="form-group">
    <%= f.label :date_of_appointment %>
    <%= f.date_field :date_of_appointment,
                     class: %w(form-control input-md-2 t-date-of-appointment) %>
  </div>

  <div class="form-group">
    <%= f.label :reference_number, 'Booking reference number' %>
    <%= f.text_field :reference_number, class: %w(form-control input-md-2 t-reference-number) %>
  </div>

  <h2>Guider details</h2>

  <div class="form-group">
    <%= f.label :guider_name, '<NAME> guider' %>
    <%= f.text_field :guider_name, class: %w(form-control input-md-3 t-guider-name) %>
  </div>

  <div class="form-group">
    <fieldset>
      <legend>
        <span>Organisation:</span>
      </legend>

      <div class="radio">
        <%= f.label :guider_organisation, value: 'cab' do %>
          <%= f.radio_button :guider_organisation, 'cab',
                             class: 't-guider-organisation-cab' %>
          Citizens Advice
        <% end %>
      </div>

      <div class="radio">
        <%= f.label :guider_organisation, value: 'tpas' do %>
          <%= f.radio_button :guider_organisation, 'tpas',
{'fraction_non_alphanumeric': 0.17772511848341233, 'fraction_numerical': 0.006031882809133994, 'mean_word_length': 2.7564724919093853, 'pattern_counts': {'":': 0, '<': 130, '<?xml version=': 0, '>': 128, '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': '3423770', 'n_tokens_mistral': 1745, 'n_tokens_neox': 1614, 'n_words': 338}