<commit_before><div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render "shared/steps/form_errors", resource: step %>

    <%= render "govuk_publishing_components/components/input", {
      label: {
        text: "Step title",
        bold: true
      },
      name: "step[title]",
      value: step.title
    } %>

    <%= render "govuk_publishing_components/components/radio", {
      name: "step[logic]",
      heading: "Step label",
      items: [
        {
          value: "number",
          text: "number",
          checked: !step.logic.present? || step.logic == "number"
        },
        {
          value: "and",
          text: "and",
          checked: step.logic == "and"
        },
        {
          value: "or",
          text: "or",
          checked: step.logic == "or"
        }
      ]
    } %>

    <%= render "govuk_publishing_components/components/radio", {
      name: "step[optional]",
      heading: "Is this step optional?",
      hint: "You must select one of these so that user activity is tracked correctly in Google Analytics.",
      items: [
        {
          value: "false",
          text: "essential",
          checked: !step.optional.present? || !step.optional
        },
        {
          value: "true",
          text: "optional",
          checked: step.optional
        }
      ]
    } %>
  </div>
</div>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render 'shared/steps/broken-links-summary', step: step %>
  </div>
</div>

<% if step.broken_links && step.broken_links.count > 0 %>
  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
      <%= render "govuk_publishing_components/components/details", {
        title: "View broken links"
      } do %>
          <% step.broken_links.each.with_index do |link, index| %>
            <dl class="govuk-summary-list">
              <div class="govuk-summary-list__row">
                <dt class="govuk-summary-list__key">
                  URL
                </dt>
                <dd class="govuk-summary-list__value">
                  <a href="<%= link['uri'] %>" target="_blank" class="govuk-link">
                    <%= link['uri'] %>
                  </a>
                </dd>
              </div>
              <div class="govuk-summary-list__row">
                <dt class="govuk-summary-list__key">
                  Last checked
                </dt>
                <dd class="govuk-summary-list__value">
                  <%= link['checked'].to_datetime.to_formatted_s(:rfc822) %>
                </dd>
              </div>
              <% if link['errors'] && link['errors'].count > 0 %>
                <div class="govuk-summary-list__row">
                  <dt class="govuk-summary-list__key">
                    Errors
                  </dt>
                  <dd class="govuk-summary-list__value">
                    <% link['errors'].each do |error| %>
                      <%= error %> <br/>
                    <% end %>
                  </dd>
                </div>
              <% end %>
              <% if link['warnings'] && link['warnings'].count > 0 %>
                <div class="govuk-summary-list__row">
                  <dt class="govuk-summary-list__key">Warnings</dt>
                  <dd class="govuk-summary-list__value">
                    <% link['warnings'].each do |warning| %>
                      <%= warning %> <br/>
                    <% end %>
                  </dd>
                </div>
              <% end %>
            </dl>
          <% end %>
      <% end %>
    </div>
  </div>
<% end %>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render "components/markdown_editor", {
      label: {
        text: "Content, tasks and links in this step",
        bold: true
      },
      textarea: {
        name: "step[contents]",
        id: "step-content",
        rows: 20,
        value: step.contents
      }
    } %>
  </div>
  <div class="govuk-grid-column-one-third">
    <%= render 'shared/steps/markdown_help' %>
  </div>
</div>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-full">
    <%= render "govuk_publishing_components/components/button", {
      text: "Save step"
    } %>
  </div>
  <div class="govuk-grid-column-full">
    <%= link_to 'Return to overview', @step_by_step_page, class: "govuk-link" %>
  </div>
</div>
<commit_msg>Remove redundant grid row wrapper<commit_after><div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render "shared/steps/form_errors", resource: step %>

    <%= render "govuk_publishing_components/components/input", {
      label: {
        text: "Step title",
        bold: true
      },
      name: "step[title]",
      value: step.title
    } %>

    <%= render "govuk_publishing_components/components/radio", {
      name: "step[logic]",
      heading: "Step label",
      items: [
        {
          value: "number",
          text: "number",
          checked: !step.logic.present? || step.logic == "number"
        },
        {
          value: "and",
          text: "and",
          checked: step.logic == "and"
        },
        {
          value: "or",
          text: "or",
          checked: step.logic == "or"
        }
      ]
    } %>

    <%= render "govuk_publishing_components/components/radio", {
      name: "step[optional]",
      heading: "Is this step optional?",
      hint: "You must select one of these so that user activity is tracked correctly in Google Analytics.",
      items: [
        {
          value: "false",
          text: "essential",
          checked: !step.optional.present? || !step.optional
        },
        {
          value: "true",
          text: "optional",
          checked: step.optional
        }
      ]
    } %>
  </div>
</div>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render 'shared/steps/broken-links-summary', step: step %>
  </div>
</div>

<% if step.broken_links && step.broken_links.count > 0 %>
  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
      <%= render "govuk_publishing_components/components/details", {
        title: "View broken links"
      } do %>
          <% step.broken_links.each.with_index do |link, index| %>
            <dl class="govuk-summary-list">
              <div class="govuk-summary-list__row">
                <dt class="govuk-summary-list__key">
                  URL
                </dt>
                <dd class="govuk-summary-list__value">
                  <a href="<%= link['uri'] %>" target="_blank" class="govuk-link">
                    <%= link['uri'] %>
                  </a>
                </dd>
              </div>
              <div class="govuk-summary-list__row">
                <dt class="govuk-summary-list__key">
                  Last checked
                </dt>
                <dd class="govuk-summary-list__value">
                  <%= link['checked'].to_datetime.to_formatted_s(:rfc822) %>
                </dd>
              </div>
              <% if link['errors'] && link['errors'].count > 0 %>
                <div class="govuk-summary-list__row">
                  <dt class="govuk-summary-list__key">
                    Errors
                  </dt>
                  <dd class="govuk-summary-list__value">
                    <% link['errors'].each do |error| %>
                      <%= error %> <br/>
                    <% end %>
                  </dd>
                </div>
              <% end %>
              <% if link['warnings'] && link['warnings'].count > 0 %>
                <div class="govuk-summary-list__row">
                  <dt class="govuk-summary-list__key">Warnings</dt>
                  <dd class="govuk-summary-list__value">
                    <% link['warnings'].each do |warning| %>
                      <%= warning %> <br/>
                    <% end %>
                  </dd>
                </div>
              <% end %>
            </dl>
          <% end %>
      <% end %>
    </div>
  </div>
<% end %>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <%= render "components/markdown_editor", {
      label: {
        text: "Content, tasks and links in this step",
        bold: true
      },
      textarea: {
        name: "step[contents]",
        id: "step-content",
        rows: 20,
        value: step.contents
      }
    } %>
  </div>
  <div class="govuk-grid-column-one-third">
    <%= render 'shared/steps/markdown_help' %>
  </div>
</div>

<div class="govuk-grid-row">
  <div class="govuk-grid-column-full">
    <%= render "govuk_publishing_components/components/button", {
      text: "Save step",
      margin_bottom: true
    } %>
    <%= tag.p (link_to 'Return to overview', @step_by_step_page, class: "govuk-link"), class: "govuk-body" %>
  </div>
</div>

{'fraction_non_alphanumeric': 0.16066636851520572, 'fraction_numerical': 0.0017889087656529517, 'mean_word_length': 1.5637718543995414, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 171, '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': '2243441', 'n_tokens_mistral': 2846, 'n_tokens_neox': 2611, 'n_words': 510}