From c38df1bc70bf050ac1631641aba0defd5b870675 Mon Sep 17 00:00:00 2001 From: Spencer Dixon Date: Fri, 17 Jan 2025 14:32:35 +0000 Subject: [PATCH] Add start page and extra spacing to bottom of mailer form submit button --- .../routes_into_teaching/steps_controller.rb | 12 +++++++++--- .../routes_into_teaching/steps/completed.html.erb | 2 +- app/views/routes_into_teaching/steps/index.html.erb | 10 ++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 app/views/routes_into_teaching/steps/index.html.erb diff --git a/app/controllers/routes_into_teaching/steps_controller.rb b/app/controllers/routes_into_teaching/steps_controller.rb index 3b7b397b82..d6e7370860 100644 --- a/app/controllers/routes_into_teaching/steps_controller.rb +++ b/app/controllers/routes_into_teaching/steps_controller.rb @@ -7,9 +7,13 @@ class StepsController < ApplicationController before_action :set_page_title before_action :set_step_page_title, only: %i[show update] before_action :noindex, if: :noindex? + before_action :set_breadcrumb layout :resolve_layout + def index + end + def completed policy_id = params[:id] @@ -20,8 +24,6 @@ def completed end @results = RoutesIntoTeaching::Routes.recommended(session[:routes_into_teaching]) - - breadcrumb @page_title, request.path end private @@ -57,6 +59,10 @@ def set_page_title @page_title = "Find your route into teaching" end + def set_breadcrumb + breadcrumb @page_title, request.path + end + def set_step_page_title if @current_step&.title @page_title += ", #{@current_step.title.downcase} step" @@ -64,7 +70,7 @@ def set_step_page_title end def resolve_layout - action_name == "completed" ? "minimal" : "registration" + %w(completed index).include?(action_name) ? "minimal" : "registration" end end end diff --git a/app/views/routes_into_teaching/steps/completed.html.erb b/app/views/routes_into_teaching/steps/completed.html.erb index b02c02c5f5..e6f239d44f 100644 --- a/app/views/routes_into_teaching/steps/completed.html.erb +++ b/app/views/routes_into_teaching/steps/completed.html.erb @@ -59,7 +59,7 @@

Get personalised guidance

Everything you need to know to start a career in teaching sent straight into your inbox. Tailored to your own situation, you'll get all the latest information as well as advice and support.

-
+
<%= form_with builder: GOVUKDesignSystemFormBuilder::FormBuilder, url: mailing_list_step_path(:name), scope: :mailing_list_steps_name, method: :put do |f| %> <%= f.govuk_text_field :first_name, autocomplete: "given-name" %> <%= f.govuk_text_field :last_name, autocomplete: "family-name" %> diff --git a/app/views/routes_into_teaching/steps/index.html.erb b/app/views/routes_into_teaching/steps/index.html.erb new file mode 100644 index 0000000000..9c3f150cc9 --- /dev/null +++ b/app/views/routes_into_teaching/steps/index.html.erb @@ -0,0 +1,10 @@ +<%= render Content::LandingHeroComponent.new( + title: "Find your route into teaching", + colour: "pastel yellow-yellow", +) %> + +
+
+ <%= link_to "Find your route into teaching", routes_into_teaching_step_path(RoutesIntoTeaching::Wizard.steps.first.key) %> +
+