<commit_before><% page_title "Unpublish: #{@edition.title}"  %>

  <div class="span8">
    <section>
      <h1><%= @edition.title %></h1>

      <%= form_tag unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do %>
        <%= fields_for :unpublishing do |unpublish| %>
          <%= unpublish.label :unpublishing_reason_id, "Do you want to archive or unpublish this document?" %>


          <%= unpublish.radio_button :unpublishing_reason_id, UnpublishingReason::Archived.id %>
          <%= unpublish.label "unpublishing_reason_id_#{UnpublishingReason::Archived.id}", "<strong>Archive:</strong> no longer current government policy/activity".html_safe %>

          <%= unpublish.radio_button :unpublishing_reason_id, UnpublishingReason::PublishedInError.id %>
          <%= unpublish.label "unpublishing_reason_id_#{UnpublishingReason::PublishedInError.id}", "<strong>Unpublish:</strong> published in error".html_safe %>


          <%= unpublish.radio_button :unpublishing_reason_id, UnpublishingReason::Consolidated.id %>
          <%= unpublish.label "unpublishing_reason_id_#{UnpublishingReason::Consolidated.id}", "<strong>Unpublish:</strong> consolidated into another GOV.UK page".html_safe %>

          <%= unpublish.text_field :alternative_url, label_text: 'Alternative URL' %>
          <%= unpublish.check_box :redirect, label_text: 'Redirect to URL automatically?' %>

          <%= unpublish.text_area :explanation, label_text: '<strong>Public explanation</strong> (this is shown on the live site)'.html_safe, rows: 5, class: "previewable"  %>

          <%= submit_tag 'Unpublish', class: "btn btn-danger" %>
          <span class="or_cancel"> or <%= link_to 'cancel', [:admin, @edition] %></span>
        <% end %>
      <% end %>
    </section>
  </div>
<commit_msg>Make unpublish form more idiomatic<commit_after><% page_title "Unpublish: #{@edition.title}"  %>

  <div class="span8">
    <section>
      <h1><%= @edition.title %></h1>

      <%= form_for @unpublishing, url: unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do |form| %>

          <%= form.label :unpublishing_reason_id, "Do you want to archive or unpublish this document?" %>

          <%= form.radio_button :unpublishing_reason_id, UnpublishingReason::Archived.id %>
          <%= form.label "unpublishing_reason_id_#{UnpublishingReason::Archived.id}", "<strong>Archive:</strong> no longer current government policy/activity".html_safe %>

          <%= form.radio_button :unpublishing_reason_id, UnpublishingReason::PublishedInError.id %>
          <%= form.label "unpublishing_reason_id_#{UnpublishingReason::PublishedInError.id}", "<strong>Unpublish:</strong> published in error".html_safe %>

          <%= form.radio_button :unpublishing_reason_id, UnpublishingReason::Consolidated.id %>
          <%= form.label "unpublishing_reason_id_#{UnpublishingReason::Consolidated.id}", "<strong>Unpublish:</strong> consolidated into another GOV.UK page".html_safe %>

          <%= form.text_field :alternative_url, label_text: 'Alternative URL' %>
          <%= form.check_box :redirect, label_text: 'Redirect to URL automatically?' %>

          <%= form.text_area :explanation, label_text: '<strong>Public explanation</strong> (this is shown on the live site)'.html_safe, rows: 5, class: "previewable"  %>

          <%= form.submit 'Unpublish', class: "btn btn-danger" %>
          <span class="or_cancel"> or <%= link_to 'cancel', [:admin, @edition] %></span>
        <% end %>
    </section>
  </div>

{'fraction_non_alphanumeric': 0.148858190019735, 'fraction_numerical': 0.002255427121511136, 'mean_word_length': 4.17956204379562, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '6608276', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1072, 'n_words': 214}