diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index ba0237f58..082ac4709 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -1,3 +1,5 @@ +include GovukLinkHelper + module CheckAnswersHelper def display_answered_questions_summary(subsection, case_log) total = subsection.applicable_questions_count(case_log) @@ -15,6 +17,6 @@ private def create_next_missing_question_link(subsection, case_log) pages_to_fill_in = subsection.unanswered_questions(case_log).map(&:page) url = "/case_logs/#{case_log.id}/#{pages_to_fill_in.first.id}" - link_to("Answer the missing questions", url, class: "govuk-link").html_safe + govuk_link_to("Answer the missing questions", url).html_safe end end diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index d31257f25..d3dbca0b5 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -1,3 +1,5 @@ +include GovukLinkHelper + module TasklistHelper STATUSES = { not_started: "Not started", @@ -38,6 +40,6 @@ module TasklistHelper else "#" end - link_to(subsection.label, next_page_path, class: "task-name govuk-link") + govuk_link_to(subsection.label, next_page_path, class: "task-name") end end diff --git a/app/views/case_logs/_log_list.html.erb b/app/views/case_logs/_log_list.html.erb index c0f856f09..1549fef37 100644 --- a/app/views/case_logs/_log_list.html.erb +++ b/app/views/case_logs/_log_list.html.erb @@ -12,7 +12,7 @@ <% case_logs.map do |log| %> - <%= link_to log.id, case_log_path(log), class: "govuk-link" %> + <%= govuk_link_to log.id, case_log_path(log) %> <%= log.property_postcode %> diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index c87ce14f0..9549285cc 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -6,7 +6,7 @@

This submission is <%= @case_log.status.to_s.humanize.downcase %>

-

You've completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.

+

You’ve completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.

<% next_incomplete_section = get_next_incomplete_section(@form, @case_log).id %>

- <%= link_to "Create new log", case_logs_path, method: :post, class: "govuk-button" %> + <%= govuk_button_link_to "Create new log", case_logs_path, method: :post %> <% if @in_progress_case_logs.present? %> <%= render partial: "log_list", locals: { case_logs: @in_progress_case_logs, title: "Logs you need to complete", date_title: "Last Changed" } %> <% end %> <% if @completed_case_logs.present? %> - <%= render partial: "log_list", locals: { case_logs: @completed_case_logs, title: "Logs you've submitted", date_title: "Date Submitted" } %> + <%= render partial: "log_list", locals: { case_logs: @completed_case_logs, title: "Logs you’ve submitted", date_title: "Date Submitted" } %> <% end %>

See all completed logs (<%= @completed_case_logs.count %>)

diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index dc55f64f6..fac57c4a2 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -2,4 +2,4 @@

You can confirm your account email through the link below:

-

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

+

<%= govuk_link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb index f667dc12f..894cbda1d 100644 --- a/app/views/devise/mailer/reset_password_instructions.html.erb +++ b/app/views/devise/mailer/reset_password_instructions.html.erb @@ -2,7 +2,7 @@

Someone has requested a link to change your password. You can do this through the link below.

-

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

+

<%= govuk_link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

If you didn't request this, please ignore this email.

Your password won't change until you access the link above and create a new one.

diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb index 41e148bf2..a36e910b5 100644 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ b/app/views/devise/mailer/unlock_instructions.html.erb @@ -4,4 +4,4 @@

Click the link below to unlock your account:

-

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

+

<%= govuk_link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 332b2fe89..8422e3349 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index e94eb88ca..48654e239 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(resource, as: resource_name, url: user_registration_path(), html: { method: :patch }) do |f| %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index d8395536a..f66521541 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -1,25 +1,25 @@ <%- if controller_name != 'sessions' %> -

Already have an account? <%= link_to "Sign in", new_session_path(resource_name) %>.


+

Already have an account? <%= govuk_link_to "Sign in", new_session_path(resource_name) %>.


<% end %> <%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%= link_to "Sign up", new_registration_path(resource_name) %>
+ <%= govuk_link_to "Sign up", new_registration_path(resource_name) %>
<% end %> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> -

You can <%= link_to "reset your password", new_password_path(resource_name) %> if you've forgotten it.


+

You can <%= govuk_link_to "reset your password", new_password_path(resource_name) %> if you’ve forgotten it.


<% end %> <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> - <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
+ <%= govuk_link_to "Didn’t receive confirmation instructions?", new_confirmation_path(resource_name) %>
<% end %> <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> - <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
+ <%= govuk_link_to "Didn’t receive unlock instructions?", new_unlock_path(resource_name) %>
<% end %> <%- if devise_mapping.omniauthable? %> <%- resource_class.omniauth_providers.each do |provider| %> - <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post %>
+ <%= govuk_link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), method: :post %>
<% end %> <% end %> diff --git a/app/views/form/_check_answers_table.html.erb b/app/views/form/_check_answers_table.html.erb index f52e3d5b6..0b511f9bf 100644 --- a/app/views/form/_check_answers_table.html.erb +++ b/app/views/form/_check_answers_table.html.erb @@ -6,6 +6,6 @@ <%= question.answer_label(@case_log) %>

- <%= link_to(question.update_answer_link_name(@case_log), "/case_logs/#{@case_log.id}/#{question.page.id}", class: "govuk-link").html_safe %> + <%= govuk_link_to(question.update_answer_link_name(@case_log), "/case_logs/#{@case_log.id}/#{question.page.id}").html_safe %>
diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 0eee408e7..744dfa503 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', 'javascript:history.back()', class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: 'javascript:history.back()', + ) %> <% end %> <%= turbo_frame_tag "case_log_form", target: "_top" do %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 5e0da8f33..4a7b6a96d 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,48 +1,28 @@ -
- - -
+ <% end %> +<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8f043f6ee..7cfc25059 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,5 @@ - + DLUHC CORE Data Collection <%= csrf_meta_tags %> @@ -25,44 +25,39 @@ - - - Skip to main content + <%= govuk_skip_link %> - - -
<%= content_for(:before_content) %>
-
+
<% flash.each do |type, msg| %> - <%= render GovukComponent::NotificationBannerComponent.new( + <%= govuk_notification_banner( title_text: 'Success', success: true, title_heading_level: 3, title_id: "swanky-notifications") do |notification_banner| @@ -74,8 +69,6 @@
- + <%= render partial: "layouts/footer" %> diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb index 06d9c7dff..a60d8f44a 100644 --- a/app/views/test/index.html.erb +++ b/app/views/test/index.html.erb @@ -27,4 +27,4 @@ end end %> -<%= link_to('About', about_path) %> +<%= govuk_link_to('About', about_path) %> diff --git a/app/views/users/account/index.html.erb b/app/views/users/account/index.html.erb index 7cc3c5d6f..83b5d76fd 100644 --- a/app/views/users/account/index.html.erb +++ b/app/views/users/account/index.html.erb @@ -43,7 +43,7 @@ ••••••••
- <%= link_to "Change", edit_user_registration_path, id: "change-password" %> + <%= govuk_link_to "Change", edit_user_registration_path, id: "change-password" %>
diff --git a/app/views/users/account/personal_details.html.erb b/app/views/users/account/personal_details.html.erb index 9f3640aaf..801575821 100644 --- a/app/views/users/account/personal_details.html.erb +++ b/app/views/users/account/personal_details.html.erb @@ -1,5 +1,8 @@ <% content_for :before_content do %> - <%= link_to 'Back', :back, class: "govuk-back-link" %> + <%= govuk_back_link( + text: 'Back', + href: :back, + ) %> <% end %> <%= form_for(current_user, as: :user, url: account_update_path(), html: { method: :patch }) do |f| %> diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 0b62cef59..ed055cc3c 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -822,11 +822,11 @@ "15": "Under occupation - no incentive", "16": "Property unsuitable because of ill health / disability", "17": "Property unsuitable because of poor condition", - "18": "Couldn't afford fees attached to renewing the tenancy", - "19": "Couldn't afford increase in rent", - "20": "Couldn't afford rent or mortgage - welfare reforms", - "21": "Couldn't afford rent or mortgage - employment", - "22": "Couldn't afford rent or mortgage - other", + "18": "Couldn’t afford fees attached to renewing the tenancy", + "19": "Couldn’t afford increase in rent", + "20": "Couldn’t afford rent or mortgage - welfare reforms", + "21": "Couldn’t afford rent or mortgage - employment", + "22": "Couldn’t afford rent or mortgage - other", "23": "To move nearer to family / friends / school", "24": "To move nearer to work", "25": "To move to accomodation with support", @@ -1546,8 +1546,8 @@ "header": "What is the reason for the property vacancy?", "hint_text": "", "type": "radio", - "answer_options": { - "0": "Renewal of fixed-term tenancy", + "answer_options": { + "0": "Renewal of fixed-term tenancy", "1": "Internal transfer (excluding renewals of a fixed-term tenancy)", "2": "Relet to tenant who occupied same property as temporary accommodation", "3": "Tenant involved in a succession downsize", @@ -1557,7 +1557,7 @@ "7": "Tenant abandoned property", "8": "Tenant evicted due to arrears", "9": "Tenant evicted due to ASB or other reason", - "10": "Previous tenant passed away (no succession)" + "10": "Previous tenant passed away (no succession)" } } }, @@ -1572,10 +1572,10 @@ "header": "What is the reason for the property vacancy?", "hint_text": "", "type": "radio", - "answer_options": { + "answer_options": { "11": "First let of newbuild property", "12": "First let of conversion/rehabilitation/acquired property", - "13": "First let of leased property" + "13": "First let of leased property" } } }, diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 260e1c4ba..ba36d7bf2 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -31,7 +31,7 @@ en: failure: "Could not authenticate you from %{kind} because \"%{reason}\"." success: "Successfully authenticated from %{kind} account." passwords: - no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." + no_token: "You can’t access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided." send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes." send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes." updated: "Your password has been changed successfully. You are now signed in." diff --git a/docs/api/DLUHC-CORE-Data.v1.json b/docs/api/DLUHC-CORE-Data.v1.json index b7d0c44c7..7f85e2096 100644 --- a/docs/api/DLUHC-CORE-Data.v1.json +++ b/docs/api/DLUHC-CORE-Data.v1.json @@ -740,19 +740,19 @@ "Other problems with neighbours", "Property unsuitable because of overcrowding", "End of assured shorthold tenancy - no fault", - "End of assured shorthold tenancy - tenant's fault", + "End of assured shorthold tenancy - tenant’s fault", "End of fixed term tenancy - no fault", - "End of fixed term tenancy - tenant's fault", + "End of fixed term tenancy - tenant’s fault", "Repossession", "Under occupation - offered incentive to downsize", "Under occupation - no incentive", "Property unsuitable because of ill health / disability", "Property unsuitable because of poor condition", - "Couldn't afford fees attached to renewing the tenancy", - "Couldn't afford increase in rent", - "Couldn't afford rent or mortgage - welfare reforms", - "Couldn't afford rent or mortgage - employment", - "Couldn't afford rent or mortgage - other", + "Couldn’t afford fees attached to renewing the tenancy", + "Couldn’t afford increase in rent", + "Couldn’t afford rent or mortgage - welfare reforms", + "Couldn’t afford rent or mortgage - employment", + "Couldn’t afford rent or mortgage - other", "To move nearer to family / friends / school", "To move nearer to work", "To move to accomodation with support", diff --git a/public/404.html b/public/404.html index 2be3af26f..4b9cf8b1b 100644 --- a/public/404.html +++ b/public/404.html @@ -1,7 +1,7 @@ - The page you were looking for doesn't exist (404) + The page you were looking for doesn’t exist (404)