<commit_before><%= form_for(@trip) do |f| %>
  <% if @trip.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@trip.errors.count, "error") %> prohibited this trip from being saved:</h2>

      <ul>
      <% @trip.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <!-- the customer id needs to be passed in this action -->
  <%= f.hidden_field :customer_id, :value=>@customer.id %>

  <fieldset>

    <ol class="section first">

      <li class="selfclear">
        <label for="customer">Customer:</label>
        <strong><%= @customer.name %></strong><!---------- TODO: Why is there a trailing ' .'? -->
      </li>

      <li class="selfclear time">
        <label for="pickup_time">Pickup time:</label>
        <%= f.text_field :pickup_time %>
      </li>

      <li class="selfclear time">
        <label for="appointment_time">Appointment time:</label>
        <%= f.text_field :appointment_time %>
      </li>

      <li class="selfclear">
        <label for="repeats_id">Repeats:</label>
        <div>
          <p>
            <input type="checkbox" name="monday" value="Monday" /> M&nbsp;
            <input type="checkbox" name="tuesday" value="Tuesday" /> T&nbsp;
            <input type="checkbox" name="wednesday" value="Wednesday" /> W&nbsp;
            <input type="checkbox" name="thursday" value="Thrusday" /> R&nbsp;
            <input type="checkbox" name="friday" value="Friday" /> F&nbsp;
          </p>
          every <input type="text" size="2" name="trip[repeat_weeks]" id="trip_repeat_weeks" /> week(s)
        </div>
<!-- TODO: make repeats checkboxes work in Rails -->
      </li>

<!-- TODO: autocomplete / geocode here -->
      <li class="selfclear">
        <label for="pickup_address_id">Pickup address:</label>
        <%= f.text_field(:pickup_address_id, :class => "full") %>
      </li>

      <li class="selfclear">
        <label for="pickup_address_id">Dropoff address:</label>
        <%= f.text_field(:dropoff_address_id, :class => "full") %>
      </li>

      <li class="selfclear">
        <label for="phone_id">Phone:</label>
        <input type="text" size="14" name="phone_id" id="phone_id" />
<!-- TODO: make phone input work in Rails -->
      </li>

      <li class="selfclear">
        <label for="alt_phone_id">Alt. Phone:</label>
        <input type="text" size="14" name="alt_phone_id" id="alt_phone_id" />
<!-- TODO: make alt_phone input work in Rails -->
      </li>
    </ol>
    
    <ol class="section second">
      <li class="selfclear">
        <label for="trip_purpose">Trip purpose:</label>
        <%= f.text_field(:trip_purpose, :class => "full") %>
      </li>

      <li class="selfclear passengers">
        <label for="guest_count">Passengers:</label>
        <div>
<!-- TODO: Guest count should be computed by
considering actual guest information, which will
be in @trip.guest; we need a widget which allows
users to add guests with their mobilities -->
          <p>
            <span class="nobreak"><%= f.text_field :guest_count %>&nbsp;Guests&nbsp;</span><commit_msg>readonly customer phone numbers<commit_after><%= form_for(@trip) do |f| %>
  <% if @trip.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@trip.errors.count, "error") %> prohibited this trip from being saved:</h2>

      <ul>
      <% @trip.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <!-- the customer id needs to be passed in this action -->
  <%= f.hidden_field :customer_id, :value=>@customer.id %>

  <fieldset>

    <ol class="section first">

      <li class="selfclear">
        <label for="customer">Customer:</label>
        <strong><%= @customer.name %></strong><!---------- TODO: Why is there a trailing ' .'? -->
      </li>

      <li class="selfclear time">
        <label for="pickup_time">Pickup time:</label>
        <%= f.text_field :pickup_time %>
      </li>

      <li class="selfclear time">
        <label for="appointment_time">Appointment time:</label>
        <%= f.text_field :appointment_time %>
      </li>

      <li class="selfclear">
        <label for="repeats_id">Repeats:</label>
        <div>
          <p>
            <input type="checkbox" name="monday" value="Monday" /> M&nbsp;
            <input type="checkbox" name="tuesday" value="Tuesday" /> T&nbsp;
            <input type="checkbox" name="wednesday" value="Wednesday" /> W&nbsp;
            <input type="checkbox" name="thursday" value="Thrusday" /> R&nbsp;
            <input type="checkbox" name="friday" value="Friday" /> F&nbsp;
          </p>
          every <input type="text" size="2" name="trip[repeat_weeks]" id="trip_repeat_weeks" /> week(s)
        </div>
<!-- TODO: make repeats checkboxes work in Rails -->
      </li>

<!-- TODO: autocomplete / geocode here -->
      <li class="selfclear">
        <label for="pickup_address_id">Pickup address:</label>
        <%= f.text_field(:pickup_address_id, :class => "full") %>
      </li>

      <li class="selfclear">
        <label for="pickup_address_id">Dropoff address:</label>
        <%= f.text_field(:dropoff_address_id, :class => "full") %>
      </li>

      <li class="selfclear">
        <label for="phone">Phone:</label>
        <input type="text" size="14" name="phone" id="phoned" value="<%= @customer.phone_number_1 %>" readonly="readonly"/>
      </li>

      <li class="selfclear">
        <label for="alt_phone">Alt. Phone:</label>
        <input type="text" size="14" name="alt_phone" id="alt_phone" value="<%= @customer.phone_number_2 %>" readonly="readonly"/>

      </li>
    </ol>
    
    <ol class="section second">
      <li class="selfclear">
        <label for="trip_purpose">Trip purpose:</label>
        <%= f.text_field(:trip_purpose, :class => "full") %>
      </li>

      <li class="selfclear passengers">
        <label for="guest_count">Passengers:</label>
        <div>
<!-- TODO: Guest count should be computed by
considering actual guest information, which will
be in @trip.guest; we need a widget which allows
users to add guests with their mobilities -->
          <p>
            <span class="nobreak"><%= f.text_field :guest_count %>&nbsp;Guests&nbsp;</span>
{'fraction_non_alphanumeric': 0.18352417302798982, 'fraction_numerical': 0.002544529262086514, 'mean_word_length': 2.7015891701000587, 'pattern_counts': {'":': 0, '<': 185, '<?xml version=': 0, '>': 193, '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': '6862444', 'n_tokens_mistral': 2110, 'n_tokens_neox': 1961, 'n_words': 466}