Skip to content

Commit ea82014

Browse files
committed
Tweaks after prod review
1 parent f83425c commit ea82014

File tree

9 files changed

+14
-10
lines changed

9 files changed

+14
-10
lines changed

app/controllers/publishers/vacancies/job_applications/references_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ class ReferencesController < BaseController
77
before_action :set_job_application
88

99
def new
10-
@notes_form = Publishers::JobApplication::NotesForm.new
10+
@note = @job_application.notes.build
1111
@referee = RefereeForm.new
1212
end
1313

1414
def create
15-
@notes_form = Publishers::JobApplication::NotesForm.new
15+
@note = @job_application.notes.build
1616
@referee = RefereeForm.new(referee_form_params)
1717
if @referee.valid?
1818
process_referee_details @referee

app/views/jobseekers/job_applications/build/referees.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ p.govuk-body = t(".description_html", link: govuk_link_to(t(".kcsie"), "https://
2929
= govuk_button_link_to t("buttons.add_another_reference"), new_jobseekers_job_application_referee_path(job_application)
3030
- else
3131
= render EmptySectionComponent.new title: t(".no_references") do
32-
= govuk_button_link_to t("buttons.add_reference"), new_jobseekers_job_application_referee_path(job_application), class: "govuk-!-margin-bottom-0"
32+
= govuk_button_link_to t("buttons.add_referee"), new_jobseekers_job_application_referee_path(job_application), class: "govuk-!-margin-bottom-0"
3333

3434
= form_for @form, url: jobseekers_job_application_build_path(job_application, :referees), method: :patch do |f|
3535
= f.govuk_error_summary

app/views/publishers/vacancies/job_applications/references/new.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ h1.govuk-heading-l = t(".heading")
3434
= f.govuk_submit t(".submit")
3535

3636
.govuk-grid-column-one-third
37-
= render PublisherNotesOnJobApplicationComponent.new(job_application: @job_application, vacancy: @vacancy, notes_form: @notes_form,
37+
= job_application_notes(job_application: @job_application, vacancy: @vacancy, note: @note,
3838
return_to_url: new_organisation_job_job_application_reference_path(@vacancy.id, @job_application.id))

config/locales/forms.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ en:
1515
add_another_training: Add another training
1616
add_another_professional_body_membership: Add another membership
1717
add_professional_body_membership: Add membership
18-
add_reference: Add a referee
18+
add_referee: Add a referee
19+
add_reference: Add a reference
1920
add_work_history: Add work history
2021
apply_filters: Apply filters
2122
back: Back

config/locales/publishers/vacancies/job_applications/referee_form.en.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ en:
1515
blank: Referee organisation can't be blank
1616
relationship:
1717
blank: Referee relationship can't be blank
18+
reference_document:
19+
blank: You must upload a file
1820
helpers:
1921
legend:
2022
publishers_vacancies_job_applications_referee_form:
@@ -31,8 +33,9 @@ en:
3133
job_title: Referee job title
3234
organisation: Referee organisation
3335
relationship: Referee relationship to applicant
34-
phone_number: Referee phone number
36+
phone_number: Referee phone number (Optional)
3537

3638
hint:
3739
publishers_vacancies_job_applications_referee_form:
3840
uploaded_details: Select one option
41+
job_title: When you complete these fields and select ‘Save reference’, we’ll email this person to request a reference.

spec/system/jobseekers/jobseekers_can_add_references_to_their_job_application_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
context "when adding a referee" do
2828
before do
29-
click_on I18n.t("buttons.add_reference")
29+
click_on I18n.t("buttons.add_referee")
3030
end
3131

3232
it "passes a11y", :a11y do

spec/system/jobseekers/jobseekers_can_complete_a_job_application_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103

104104
click_on(I18n.t("jobseekers.job_applications.build.referees.heading"))
105105

106-
click_on I18n.t("buttons.add_reference")
106+
click_on I18n.t("buttons.add_referee")
107107
click_on I18n.t("buttons.save_reference")
108108
expect(page).to have_content("There is a problem")
109109
fill_in_referee

spec/system/jobseekers/jobseekers_can_complete_a_religious_job_application_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def fill_in_application_up_to_and_including_personal_statement
365365

366366
def complete_from_references_page
367367
click_on(I18n.t("jobseekers.job_applications.build.referees.heading"))
368-
click_on I18n.t("buttons.add_reference")
368+
click_on I18n.t("buttons.add_referee")
369369
fill_in_referee
370370
click_on I18n.t("buttons.save_reference")
371371
click_on I18n.t("buttons.add_another_reference")

spec/system/publishers/publishers_can_add_a_manual_reference_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
before do
1717
login_publisher(publisher: publisher, organisation: organisation)
1818
publisher_ats_pre_interview_checks_page.load(vacancy_id: vacancy.id, job_application_id: job_application.id)
19-
click_on "Add a referee"
19+
click_on "Add a reference"
2020
end
2121

2222
after { logout }

0 commit comments

Comments
 (0)