<commit_before><% initialise_script "GOVUK.StatisticsAnnouncementDateForm", 'statistics_announcement_date_change' %>
<% page_title "Change statistics announcement release date" %>

<div class="stats-form-wrapper">
  <h1>
    <span class="stats-small-heading">
      <%= @statistics_announcement.title %>
    </span>
    <span class="stats-heading">
      Change release date
    </span>
  </h1>

  <%= form_for @statistics_announcement_date_change, url: admin_statistics_announcement_changes_path(@statistics_announcement), html: {class: 'form-large'} do |form| %>
    <%= form.errors %>
    <%= render '/admin/statistics_announcements/release_date', form: form %>
    <div class="form-group">
      <% if @statistics_announcement.confirmed? %>
        <%= form.text_area :change_note, required: true, rows: 5, class: 'form-control', label_text: 'Public change note' %>
      <% end %>
    </div>
    <%= form.save_or_cancel_buttons buttons: { save: 'Publish change of date' }, cancel: [:admin, @statistics_announcement] %>
  <% end %>
</div><commit_msg>Warn stats publishers that they must also edit publication release dates<commit_after><% initialise_script "GOVUK.StatisticsAnnouncementDateForm", 'statistics_announcement_date_change' %>
<% page_title "Change statistics announcement release date" %>

<div class="stats-form-wrapper">
  <h1>
    <span class="stats-small-heading">
      <%= @statistics_announcement.title %>
    </span>
    <span class="stats-heading">
      Change release date
    </span>
  </h1>

  <%= form_for @statistics_announcement_date_change, url: admin_statistics_announcement_changes_path(@statistics_announcement), html: {class: 'form-large'} do |form| %>
    <%= form.errors %>
    <%= render '/admin/statistics_announcements/release_date', form: form %>
    <div class="form-group">
      <% if @statistics_announcement.confirmed? %>
        <%= form.text_area :change_note, required: true, rows: 5, class: 'form-control', label_text: 'Public change note' %>
      <% end %>
    </div>
    <% if @statistics_announcement.publication %>
      <div class="alert">
        <span>Don’t forget to change the release date of the <%= link_to "attached publication", [:admin, @statistics_announcement.publication] %> as well.</span>
      </div>
    <% end %>
    <%= form.save_or_cancel_buttons buttons: { save: 'Publish change of date' }, cancel: [:admin, @statistics_announcement] %>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.14919852034525277, 'fraction_numerical': 0.002466091245376079, 'mean_word_length': 4.384955752212389, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, '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': '6815979', 'n_tokens_mistral': 819, 'n_tokens_neox': 763, 'n_words': 167}