Skip to content

Commit

Permalink
Improve error messaging and spacing of results cards
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerldixon committed Jan 16, 2025
1 parent 831eb76 commit d4fbd6a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/models/routes_into_teaching/steps/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RoutesIntoTeaching::Steps
class Location < GITWizard::Step
attribute :location

validates :location, presence: true
validates :location, presence: { message: RoutesIntoTeaching::Wizard::DEFAULT_ERROR_MESSAGE }

def seen?
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RoutesIntoTeaching::Steps
class UndergraduateDegree < GITWizard::Step
attribute :undergraduate_degree

validates :undergraduate_degree, presence: true
validates :undergraduate_degree, presence: { message: RoutesIntoTeaching::Wizard::DEFAULT_ERROR_MESSAGE }

def options
option_struct = Struct.new(:answer, :text, keyword_init: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module RoutesIntoTeaching::Steps
class UnqualifiedTeacher < GITWizard::Step
attribute :unqualified_teacher

validates :unqualified_teacher, presence: true
validates :unqualified_teacher, presence: { message: RoutesIntoTeaching::Wizard::DEFAULT_ERROR_MESSAGE }

def seen?
false
Expand Down
2 changes: 2 additions & 0 deletions app/models/routes_into_teaching/wizard.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module RoutesIntoTeaching
class Wizard < ::GITWizard::Base
DEFAULT_ERROR_MESSAGE = "Choose an option from the list"

self.steps = [
Steps::UndergraduateDegree,
Steps::UnqualifiedTeacher,
Expand Down
4 changes: 2 additions & 2 deletions app/views/routes_into_teaching/steps/completed.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
course_length: result["course_length"],
funding: result["funding"],
text: result["description"],
link_text: "Find out more",
link_target: "/steps-to-become-a-teacher",
link_text: result["cta_text"],
link_target: result["cta_link"],
) %>
</div>
<% end %>
Expand Down
23 changes: 12 additions & 11 deletions app/webpacker/styles/components/results-box.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.results-box {
background: $white;
color: $white;
padding: 1em 0em;

&--yellow {
border: 2px solid $yellow;
Expand All @@ -17,9 +18,9 @@

&__title {
background: $yellow;
color: $black;
color: $black;
font-weight: bolder;
display: inline-block;
display: inline-block;
padding: 0.25em 0.5em;
}

Expand All @@ -43,18 +44,18 @@

&__info-row {
display: flex;
justify-content: flex-start;
align-items: flex-start;
justify-content: flex-start;
align-items: flex-start;
}

&__label {
flex: 1;
flex: 1;
text-align: left;
font-weight: bold;
}

&__value {
flex: 2;
flex: 2;
text-align: left;
}

Expand Down Expand Up @@ -84,17 +85,17 @@
@include mq($until: tablet) {
.results-box__info-row {
flex-direction: column;
align-items: flex-start;
align-items: flex-start;
}

.results-box__label,
.results-box__value {
flex: none;
width: 100%;
flex: none;
width: 100%;
}

.results-box__label {
margin-bottom: 0.25rem;
margin-bottom: 0.25rem;
}
}
}
16 changes: 16 additions & 0 deletions config/routes_into_teaching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ routes:
course_fee: "Yes"
funding: Scholarships or bursaries, as well as student loans, are available if you’re eligible
description: Postgraduate teacher training combines theoretical learning with at least 2 classroom placements in schools. Over your course, you’ll get the experience and knowledge you need to get qualified teacher status (QTS). On some courses, you can also combine QTS with a postgraduate certificate in education (PGCE).
cta_text: Find out more about postgraduate teacher training with fees
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["Yes", "Not yet"]
Expand All @@ -17,6 +19,8 @@ routes:
course_fee: Varies
funding: Not available
description: Salaried teacher training allows you to earn an unqualified teacher’s salary while you train towards qualified teacher status (QTS). You’ll still do some theoretical learning, but most of your time will be spent in school placements. These courses are in high demand and very competitive, and training providers may want you to have significant teaching or school experience. The main salaried courses include School Direct salaried and postgraduate teaching apprenticeships (PGTA
cta_text: Find out more about postgraduate teacher training with a salary
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["Yes", "Not yet"]
Expand All @@ -30,6 +34,8 @@ routes:
course_fee: "No"
funding: Not available
description: Teach First is a charitable organisation that delivers an employment-based route to teaching for high performing graduates and career changers. You’ll earn a salary while working towards qualified teacher status (QTS) with a postgraduate certificate in education (PGCE).
cta_text: Find out more about Teach First Training Programme
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["Yes", "Not yet"]
Expand All @@ -43,6 +49,8 @@ routes:
course_fee: "Yes"
funding: Not available
description: If you’ve worked as an unqualified teacher, you may be able to get qualified teacher status (QTS) through an assessment only programme. With this route, you do not need to do any further training. Instead, you’ll undertake a series of assessments. This may include lesson observations, providing a portfolio of evidence to show you meet the teachers’ standards, or written assessments. This will vary by your provider
cta_text: Find out more about Assessment only routes
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["Yes", "Not yet"]
Expand All @@ -56,6 +64,8 @@ routes:
course_fee: "Yes"
funding: "No"
description: These courses are in high demand and very competitive, so it’s important to apply as soon as you can if you’re eligible.standards, or written assessments. This will vary by your provider.
cta_text: Find out more about Undergraduate initial teacher training
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["No"]
Expand All @@ -69,6 +79,8 @@ routes:
course_fee: "Yes"
funding: "No"
description: International qualified teacher status (iQTS) is a teaching qualification backed by the UK government. iQTS meets the same high standards as English qualified teacher status (QTS) and leads to the automatic award of QTS. You can train where you live and work, with no need to visit the UK.
cta_text: Find out more about iQTS
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["Yes", "Not yet"]
Expand All @@ -82,6 +94,8 @@ routes:
course_fee: No - you will be paid a salary
funding: "No"
description: These courses are in high demand and very competitive, so it’s important to apply as soon as you can if you’re eligible.
cta_text: Find out more about Teacher degree apprenticeship
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["No"]
Expand All @@ -95,6 +109,8 @@ routes:
course_fee: "Yes"
funding: "No"
description:
cta_text: Find out more about Undergraduate degree followed by postgraduate teacher training
cta_link: /steps-to-become-a-teacher
matches:
- question: undergraduate_degree
answers: ["No"]
Expand Down

0 comments on commit d4fbd6a

Please sign in to comment.