<commit_before><% content_for(:canonical, "https://www.moneyhelper.org.uk/#{locale}/contact-us/complaints-about-pension-wise") %>
<% content_for(:noindex, true) %>

<div class="l-column-full">
  <% if params[:sent] %>
    <%= t('.complaints.sent.html') %>
  <% else %>
    <%= form_for @complaint, url: contact_path(anchor: :complaints) do |f| %>
      <% if f.object.errors.any? %>
        <div class="error-summary t-errors" role="alert" tabindex="-1" data-error-summary>
          <h2 class="heading-medium error-summary-heading">
            <%= t('.complaints.form.error.heading') %>
          </h2>

          <p><%= t('.complaints.form.error.message') %></p>

          <ul class="error-summary-list">
            <% f.object.errors.each do |key, message| %>
              <li><%= link_to "#{Complaint.human_attribute_name key} – #{message}", "#complaint_#{key}" %></li>
            <% end %>
          </ul>
        </div>
      <% end %>

      <div class="form-group <%= 'form-group-error' if f.object.errors.include?(:name) %>">
        <%= f.label :name, class: 'form-label-bold' %>
        <% if f.object.errors.include?(:name) %>
          <span class="error-message"><%= f.object.errors[:name].to_sentence.capitalize %></span>
        <% end %>
        <%= f.text_field :name, aria: { required: true }, class: "form-control #{'form-control-error' if @complaint.errors.include?(:name)}" %>
      </div>

      <div class="form-group <%= 'form-group-error' if f.object.errors.include?(:email_address) %>">
        <%= f.label :email_address, class: 'form-label-bold' %>
        <% if f.object.errors.include?(:email_address) %>
          <span class="error-message"><%= f.object.errors[:email_address].to_sentence.capitalize %></span>
        <% end %>
        <%= f.email_field :email_address, class: "form-control #{'form-control-error' if @complaint.errors.include?(:email_address)}" %>
      </div>

      <div id="complaint_nature_of_complaint" class="form-group t-nature-of-complaint <%= 'form-group-error' if @complaint.errors.include?(:nature_of_complaint) %>" data-radio-toggle tabindex="-1">
        <fieldset aria-required="true">
          <legend class="form-label-bold"><%= t('.complaints.form.nature_of_complaint.legend') %></legend>

          <% if @complaint.errors.include?(:nature_of_complaint) %>
            <span class="error-message"><%= @complaint.errors[:nature_of_complaint].to_sentence.capitalize %></span>
          <% end %>

          <% Complaint::NATURE_OF_COMPLAINT.each do |option| %>
            <div class="multiple-choice" data-target="<%= option %>">
              <%= f.radio_button :nature_of_complaint, option, { class: "t-nature-of-complaint-#{option.to_s.dasherize} form-control" } %>
              <%= f.label :nature_of_complaint, value: option, class: 'block-label selection-button-radio' do %>
                <%= t(".complaints.form.nature_of_complaint.options.#{option}", default: option) %>
              <% end %>
            </div>
          <% end %>
        </fieldset>
      </div>

      <div class="form-group js-hidden <%= 'form-group-error' if @complaint.errors.include?(:phone_booking_message) %>" id="phone_booking_message"><commit_msg>Fix the display of these radio buttons<commit_after><% content_for(:canonical, "https://www.moneyhelper.org.uk/#{locale}/contact-us/complaints-about-pension-wise") %>
<% content_for(:noindex, true) %>

<div class="l-column-full">
  <% if params[:sent] %>
    <%= t('.complaints.sent.html') %>
  <% else %>
    <%= form_for @complaint, url: contact_path(anchor: :complaints) do |f| %>
      <% if f.object.errors.any? %>
        <div class="error-summary t-errors" role="alert" tabindex="-1" data-error-summary>
          <h2 class="heading-medium error-summary-heading">
            <%= t('.complaints.form.error.heading') %>
          </h2>

          <p><%= t('.complaints.form.error.message') %></p>

          <ul class="error-summary-list">
            <% f.object.errors.each do |key, message| %>
              <li><%= link_to "#{Complaint.human_attribute_name key} – #{message}", "#complaint_#{key}" %></li>
            <% end %>
          </ul>
        </div>
      <% end %>

      <div class="form-group <%= 'form-group-error' if f.object.errors.include?(:name) %>">
        <%= f.label :name, class: 'form-label-bold' %>
        <% if f.object.errors.include?(:name) %>
          <span class="error-message"><%= f.object.errors[:name].to_sentence.capitalize %></span>
        <% end %>
        <%= f.text_field :name, aria: { required: true }, class: "form-control #{'form-control-error' if @complaint.errors.include?(:name)}" %>
      </div>

      <div class="form-group <%= 'form-group-error' if f.object.errors.include?(:email_address) %>">
        <%= f.label :email_address, class: 'form-label-bold' %>
        <% if f.object.errors.include?(:email_address) %>
          <span class="error-message"><%= f.object.errors[:email_address].to_sentence.capitalize %></span>
        <% end %>
        <%= f.email_field :email_address, class: "form-control #{'form-control-error' if @complaint.errors.include?(:email_address)}" %>
      </div>

      <div id="complaint_nature_of_complaint" class="form-group t-nature-of-complaint <%= 'form-group-error' if @complaint.errors.include?(:nature_of_complaint) %>" data-radio-toggle tabindex="-1">
        <fieldset aria-required="true">
          <legend class="form-label-bold"><%= t('.complaints.form.nature_of_complaint.legend') %></legend>

          <% if @complaint.errors.include?(:nature_of_complaint) %>
            <span class="error-message"><%= @complaint.errors[:nature_of_complaint].to_sentence.capitalize %></span>
          <% end %>

          <% Complaint::NATURE_OF_COMPLAINT.each do |option| %>
            <div class="multiple-choice" data-target="<%= option %>">
              <%= f.radio_button :nature_of_complaint, option, { class: "t-nature-of-complaint-#{option.to_s.dasherize}" } %>
              <%= f.label :nature_of_complaint, value: option, class: 'block-label selection-button-radio' do %>
                <%= t(".complaints.form.nature_of_complaint.options.#{option}", default: option) %>
              <% end %>
            </div>
          <% end %>
        </fieldset>
      </div>

      <div class="form-group js-hidden <%= 'form-group-error' if @complaint.errors.include?(:phone_booking_message) %>" id="phone_booking_message">
{'fraction_non_alphanumeric': 0.19723344731115947, 'fraction_numerical': 0.0012433944668946222, 'mean_word_length': 2.94543225015328, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 139, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3492026', 'n_tokens_mistral': 2290, 'n_tokens_neox': 1999, 'n_words': 326}