-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rejig teacher training adviser flow to allow for primary candidates t…
…o also get an adviser instead of stopping the flow
- Loading branch information
1 parent
8549a17
commit 3d20c1a
Showing
11 changed files
with
67 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
app/models/teacher_training_adviser/steps/primary_returner.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module TeacherTrainingAdviser::Steps | ||
class StageTaught < GITWizard::Step | ||
attribute :stage_taught, :string | ||
|
||
validates :stage_taught, inclusion: { in: ['primary', 'secondary'] } | ||
|
||
def previous_stage_primary? | ||
stage_taught == 'primary' | ||
end | ||
|
||
def skipped? | ||
!other_step(:returning_teacher).returning_to_teaching | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
app/views/teacher_training_adviser/steps/_primary_returner.erb
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
app/views/teacher_training_adviser/steps/_stage_taught.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<%= f.govuk_radio_buttons_fieldset(:stage_taught, inline: true, legend: { tag: "h1", text: "Which stage did you previously teach?" }) do %> | ||
<%= f.govuk_radio_button :stage_taught, "primary", label: { text: 'Primary' }, link_errors: true %> | ||
<%= f.govuk_radio_button :stage_taught, "secondary", label: { text: "Secondary" }, link_errors: true %> | ||
<% end %> |