diff --git a/app/views/claims/postcode_search.html.erb b/app/views/claims/postcode_search.html.erb index e2389d6129..630f2db6dd 100644 --- a/app/views/claims/postcode_search.html.erb +++ b/app/views/claims/postcode_search.html.erb @@ -2,47 +2,50 @@
- <%= render("shared/error_summary", instance: @form) if @form.errors.any? %> + <%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> + <%= f.govuk_error_summary %> - <%= form_for @form, url: claim_path(current_journey_routing_name) do |form| %> <% if @form.errors.any? %> -
- -

<%= I18n.t("questions.address.home.no_address_found") %>

-
- + <%= f.govuk_fieldset legend: { + text: I18n.t("questions.address.home.no_address_found"), + tag: "h1", + size: "l" + } do %>

We have not been able to find your address. Check the details you have provided, or enter your address manually.

Postcode

+

- <%= @form.postcode %> - <%= link_to "Change", claim_path(current_journey_routing_name, "postcode-search"), class: "govuk-link govuk-!-margin-left-3", "aria-label": "Change" %> + <% if @form.postcode.present? %> + <%= @form.postcode %> + <% end %> + <%= govuk_link_to "Change", claim_path(current_journey_routing_name, "postcode-search"), "aria-label": "Change" %>

- <%= link_to I18n.t("questions.address.home.link_to_manual_address"), claim_path(current_journey_routing_name, "address"), class: "govuk-button", "aria-label": I18n.t("questions.address.home.link_to_manual_address"), role: "button", data: {module: "govuk-button"} %> -
+ <%= govuk_button_link_to I18n.t("questions.address.home.link_to_manual_address"), claim_path(current_journey_routing_name, "address"), "aria-label": I18n.t("questions.address.home.link_to_manual_address") %> + <% end %> <% else %> -
- -

<%= I18n.t("questions.address.home.title") %>

-
- <%= form_group_tag @form do %> - <%= form.label :postcode, class: "govuk-label govuk-label--m" %> - <%= errors_tag @form, :postcode %> - <%= form.text_field :postcode, - class: css_classes_for_input(form.object, :postcode, "govuk-input--width-10"), - required: true, - "aria-describedby" => "postcode-hint" - %> - <% end %> + <%= f.govuk_fieldset legend: { + text: I18n.t("questions.address.home.title"), + tag: "h1", + size: "l" + } do %> + <%= f.govuk_text_field :postcode, + width: 10, + required: true, + label: { + text: "Postcode", + size: "m" + } %> + + <%= govuk_link_to I18n.t("questions.address.home.link_to_manual_address"), claim_path(current_journey_routing_name, "address"), "aria-label": I18n.t("questions.address.home.link_to_manual_address") %> + <% end %> - <%= link_to I18n.t("questions.address.home.link_to_manual_address"), claim_path(current_journey_routing_name, "address"), class: "govuk-link", "aria-label": I18n.t("questions.address.home.link_to_manual_address") %> -

- <%= form.submit "Search", class: "govuk-button" %> + <%= f.govuk_submit "Search" %>

<% end %> <% end %>