Skip to content

Commit

Permalink
Add start page and extra spacing to bottom of mailer form submit button
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerldixon committed Jan 17, 2025
1 parent d4fbd6a commit c38df1b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
12 changes: 9 additions & 3 deletions app/controllers/routes_into_teaching/steps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand All @@ -20,8 +24,6 @@ def completed
end

@results = RoutesIntoTeaching::Routes.recommended(session[:routes_into_teaching])

breadcrumb @page_title, request.path
end

private
Expand Down Expand Up @@ -57,14 +59,18 @@ 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"
end
end

def resolve_layout
action_name == "completed" ? "minimal" : "registration"
%w(completed index).include?(action_name) ? "minimal" : "registration"
end
end
end
2 changes: 1 addition & 1 deletion app/views/routes_into_teaching/steps/completed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<h2 class="call-to-action__heading">Get personalised guidance</h2>
<p>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.</p>

<div class="row col-space-s">
<div class="row col-space-m">
<%= 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" %>
Expand Down
10 changes: 10 additions & 0 deletions app/views/routes_into_teaching/steps/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<%= render Content::LandingHeroComponent.new(
title: "Find your route into teaching",
colour: "pastel yellow-yellow",
) %>

<section class="container">
<div class="row">
<%= link_to "Find your route into teaching", routes_into_teaching_step_path(RoutesIntoTeaching::Wizard.steps.first.key) %>
</div>
</section>

0 comments on commit c38df1b

Please sign in to comment.