<commit_before><%= form_for @form, remote: true, method: :post, url: realtime_bookable_slot_copies_path(location_id: @form.location_id, date: @form.date, guider_id: @form.guider_id) do |f| %>
<div class="modal-header">
  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  </button>
  <h4 class="modal-title t-title">
    Copy slots for <%= @form.guider_name %> <small><%= @form.date.to_date.to_s(:govuk_date) %></small>
  </h4>
</div>

<div class="modal-body">
  <% if @form.errors.any? %>
    <div class="alert alert-danger t-errors" role="alert">
      <h3 class="alert__heading h4">There's a problem</h3>
      <ul>
        <% @form.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <h4>Slots to copy from</h4>
  <div class="form-group">
    <%= f.collection_check_boxes(:slots, @form.time_slots, :start_at, :start_at, include_hidden: false, checked: @form.slots) do |b| %>
      <%= b.label(class: 'checkbox-inline') do %>
        <%= b.check_box %>
        <%= b.object.start_at.to_s(:govuk_time) %>
      <% end %>
    <% end %>
  </div>

  <h4>Days to copy to</h4>
  <div class="form-group">
    <%= f.collection_check_boxes(:day_ids, weekday_options, :first, :last, include_hidden: false, checked: @form.day_ids) do |b| %>
      <%= b.label(class: 'checkbox-inline') do %>
        <%= b.check_box %>
        <%= b.text %>
      <% end %>
    <% end %>
  </div>

  <h4>Between these dates <small>(inclusive)</small></h4>
  <div class="form-group">
    <div class="input-group col-xs-5">
      <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
      <%= f.text_field :date_range, class: 'js-date-range-picker form-control t-date-range', data: { config: copy_modal_configuration } %><commit_msg>Display message when no slots are present<commit_after><%= form_for @form, remote: true, method: :post, url: realtime_bookable_slot_copies_path(location_id: @form.location_id, date: @form.date, guider_id: @form.guider_id) do |f| %>
<div class="modal-header">
  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  </button>
  <h4 class="modal-title t-title">
    Copy slots for <%= @form.guider_name %> <small><%= @form.date.to_date.to_s(:govuk_date) %></small>
  </h4>
</div>

<div class="modal-body">
  <% if @form.errors.any? %>
    <div class="alert alert-danger t-errors" role="alert">
      <h3 class="alert__heading h4">There's a problem</h3>
      <ul>
        <% @form.errors.full_messages.each do |msg| %>
          <li><%= msg %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <h4>Slots to copy from</h4>
  <% if @form.time_slots.any? %>
    <div class="form-group">
      <%= f.collection_check_boxes(:slots, @form.time_slots, :start_at, :start_at, include_hidden: false, checked: @form.slots) do |b| %>
        <%= b.label(class: 'checkbox-inline') do %>
          <%= b.check_box %>
          <%= b.object.start_at.to_s(:govuk_time) %>
        <% end %>
      <% end %>
    </div>
  <% else %>
    <p class="lead">There are not slots available to copy on this day</p>
  <% end %>

  <h4>Days to copy to</h4>
  <div class="form-group">
    <%= f.collection_check_boxes(:day_ids, weekday_options, :first, :last, include_hidden: false, checked: @form.day_ids) do |b| %>
      <%= b.label(class: 'checkbox-inline') do %>
        <%= b.check_box %>
        <%= b.text %>
      <% end %>
    <% end %>
  </div>

  <h4>Between these dates <small>(inclusive)</small></h4>
  <div class="form-group">
    <div class="input-group col-xs-5">
      <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
      <%= f.text_field :date_range, class: 'js-date-range-picker form-control t-date-range', data: { config: copy_modal_configuration } %>
{'fraction_non_alphanumeric': 0.2001013171225937, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 3.402452619843924, 'pattern_counts': {'":': 0, '<': 124, '<?xml version=': 0, '>': 124, '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': '7482162', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1422, 'n_words': 287}