diff --git a/app/controllers/support_interface/countries_controller.rb b/app/controllers/support_interface/countries_controller.rb index 99400b70c9..ce98582c5b 100644 --- a/app/controllers/support_interface/countries_controller.rb +++ b/app/controllers/support_interface/countries_controller.rb @@ -14,9 +14,12 @@ def edit eligibility_enabled: country.eligibility_enabled, eligibility_skip_questions: country.eligibility_skip_questions, has_regions: country.regions.count > 1, + other_information: country.other_information, qualifications_information: country.qualifications_information, region_names: country.regions.pluck(:name).join("\n"), requires_preliminary_check: country.requires_preliminary_check, + sanction_information: country.sanction_information, + status_information: country.status_information, teaching_authority_address: country.teaching_authority_address, teaching_authority_certificate: country.teaching_authority_certificate, @@ -25,11 +28,6 @@ def edit teaching_authority_name: country.teaching_authority_name, teaching_authority_online_checker_url: country.teaching_authority_online_checker_url, - teaching_authority_other: country.teaching_authority_other, - teaching_authority_sanction_information: - country.teaching_authority_sanction_information, - teaching_authority_status_information: - country.teaching_authority_status_information, teaching_authority_websites_string: country.teaching_authority_websites_string, ) @@ -66,21 +64,21 @@ def country def country_params params.require(:support_interface_country_form).permit( - :has_regions, - :region_names, :eligibility_enabled, :eligibility_skip_questions, + :has_regions, + :other_information, :qualifications_information, + :region_names, :requires_preliminary_check, - :teaching_authority_name, + :sanction_information, + :status_information, :teaching_authority_address, - :teaching_authority_emails_string, - :teaching_authority_websites_string, :teaching_authority_certificate, - :teaching_authority_other, - :teaching_authority_sanction_information, - :teaching_authority_status_information, + :teaching_authority_emails_string, + :teaching_authority_name, :teaching_authority_online_checker_url, + :teaching_authority_websites_string, ) end end diff --git a/app/controllers/support_interface/regions_controller.rb b/app/controllers/support_interface/regions_controller.rb index 7a958aa1f3..3dbf23f6d2 100644 --- a/app/controllers/support_interface/regions_controller.rb +++ b/app/controllers/support_interface/regions_controller.rb @@ -33,21 +33,21 @@ def load_region def region_params params.require(:region).permit( :application_form_skip_work_history, + :other_information, :qualifications_information, :reduced_evidence_accepted, :requires_preliminary_check, :sanction_check, + :sanction_information, :status_check, + :status_information, :teaching_authority_address, :teaching_authority_certificate, :teaching_authority_emails_string, :teaching_authority_name, :teaching_authority_online_checker_url, - :teaching_authority_other, :teaching_authority_provides_written_statement, :teaching_authority_requires_submission_email, - :teaching_authority_sanction_information, - :teaching_authority_status_information, :teaching_authority_websites_string, :written_statement_optional, ) diff --git a/app/controllers/teacher_interface/registration_number_controller.rb b/app/controllers/teacher_interface/registration_number_controller.rb index 0f1240e431..df6ede4119 100644 --- a/app/controllers/teacher_interface/registration_number_controller.rb +++ b/app/controllers/teacher_interface/registration_number_controller.rb @@ -7,7 +7,6 @@ class RegistrationNumberController < BaseController before_action :redirect_unless_application_form_is_draft before_action :load_application_form - before_action :load_teaching_authority_other def edit @registration_number_form = @@ -33,10 +32,5 @@ def registration_number_form_params :registration_number, ) end - - def load_teaching_authority_other - @teaching_authority_other = - application_form.region.teaching_authority_other - end end end diff --git a/app/forms/support_interface/country_form.rb b/app/forms/support_interface/country_form.rb index 1d75ccf9cc..e9486a77fd 100644 --- a/app/forms/support_interface/country_form.rb +++ b/app/forms/support_interface/country_form.rb @@ -10,17 +10,17 @@ class SupportInterface::CountryForm attribute :eligibility_enabled, :boolean attribute :eligibility_skip_questions, :boolean attribute :has_regions, :boolean + attribute :other_information, :string attribute :qualifications_information, :string attribute :region_names, :string attribute :requires_preliminary_check, :boolean + attribute :sanction_information, :string + attribute :status_information, :string attribute :teaching_authority_address, :string attribute :teaching_authority_certificate, :string attribute :teaching_authority_emails_string, :string attribute :teaching_authority_name, :string attribute :teaching_authority_online_checker_url, :string - attribute :teaching_authority_other, :string - attribute :teaching_authority_sanction_information, :string - attribute :teaching_authority_status_information, :string attribute :teaching_authority_websites_string, :string validates :eligibility_enabled, inclusion: { in: [true, false] } @@ -53,16 +53,16 @@ def assign_country_attributes country.assign_attributes( eligibility_enabled:, eligibility_skip_questions:, + other_information:, qualifications_information:, requires_preliminary_check:, + sanction_information:, + status_information:, teaching_authority_address:, teaching_authority_certificate:, teaching_authority_emails_string:, teaching_authority_name:, teaching_authority_online_checker_url:, - teaching_authority_other:, - teaching_authority_sanction_information:, - teaching_authority_status_information:, teaching_authority_websites_string:, ) end diff --git a/app/views/shared/eligible_region_content_components/_proof_of_recognition.html.erb b/app/views/shared/eligible_region_content_components/_proof_of_recognition.html.erb index 34338fbf17..40dd354a87 100644 --- a/app/views/shared/eligible_region_content_components/_proof_of_recognition.html.erb +++ b/app/views/shared/eligible_region_content_components/_proof_of_recognition.html.erb @@ -80,22 +80,22 @@ <% end %> <% if region.status_check_written? %> - <% if region.teaching_authority_status_information.present? %> - <%= raw GovukMarkdown.render(region.teaching_authority_status_information) %> + <% if region.status_information.present? %> + <%= raw GovukMarkdown.render(region.status_information) %> <% end %> - <% if region.country.teaching_authority_status_information.present? %> - <%= raw GovukMarkdown.render(region.country.teaching_authority_status_information) %> + <% if region.country.status_information.present? %> + <%= raw GovukMarkdown.render(region.country.status_information) %> <% end %> <% end %> <% if region.sanction_check_written? %> - <% if region.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(region.teaching_authority_sanction_information) %> + <% if region.sanction_information.present? %> + <%= raw GovukMarkdown.render(region.sanction_information) %> <% end %> - <% if region.country.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(region.country.teaching_authority_sanction_information) %> + <% if region.country.sanction_information.present? %> + <%= raw GovukMarkdown.render(region.country.sanction_information) %> <% end %> <% end %> @@ -109,32 +109,32 @@ <% end %> <% if region.status_check_online? %> - <% if region.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(region.teaching_authority_status_information) %> + <% if region.status_information.present? %> + <%= raw GovukMarkdown.render(region.status_information) %> <% end %> - <% if region.country.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(region.country.teaching_authority_status_information) %> + <% if region.country.status_information.present? %> + <%= raw GovukMarkdown.render(region.country.status_information) %> <% end %> <% end %> <% if region.sanction_check_online? %> - <% if region.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(region.teaching_authority_sanction_information) %> + <% if region.sanction_information.present? %> + <%= raw GovukMarkdown.render(region.sanction_information) %> <% end %> - <% if region.country.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(region.country.teaching_authority_sanction_information) %> + <% if region.country.sanction_information.present? %> + <%= raw GovukMarkdown.render(region.country.sanction_information) %> <% end %> <% end %> <%# "Other" information %> - <% if region.teaching_authority_other.present? %> - <%= raw GovukMarkdown.render(region.teaching_authority_other) %> + <% if region.other_information.present? %> + <%= raw GovukMarkdown.render(region.other_information) %> <% end %> - <% if region.country.teaching_authority_other.present?%> - <%= raw GovukMarkdown.render(region.country.teaching_authority_other) %> + <% if region.country.other_information.present? %> + <%= raw GovukMarkdown.render(region.country.other_information) %> <% end %> <% end %> diff --git a/app/views/shared/support_interface/forms/_changes_to_eligible_page.html.erb b/app/views/shared/support_interface/forms/_changes_to_eligible_page.html.erb index cba0d43f3a..54fed14fcd 100644 --- a/app/views/shared/support_interface/forms/_changes_to_eligible_page.html.erb +++ b/app/views/shared/support_interface/forms/_changes_to_eligible_page.html.erb @@ -5,5 +5,5 @@
Proof that you’re recognised as a teacher
Example: ‘TRCN will charge you a fee of ₦60,000 for providing the Letter of Professional standing. They’ll also need your QTS application reference number, as well as copies of your teaching documents.’
-<%= f.govuk_text_area :teaching_authority_sanction_information, label: { text: 'Sanction Information' }, rows: 5 %> -<%= f.govuk_text_area :teaching_authority_status_information, label: { text: 'Status Information' }, rows: 5 %> +<%= f.govuk_text_area :sanction_information, label: { text: 'Sanction Information' }, rows: 5 %> +<%= f.govuk_text_area :status_information, label: { text: 'Status Information' }, rows: 5 %> diff --git a/app/views/shared/support_interface/forms/_teaching_authority_form_fields.html.erb b/app/views/shared/support_interface/forms/_teaching_authority_form_fields.html.erb index 4352ff8c6f..2646990dbc 100644 --- a/app/views/shared/support_interface/forms/_teaching_authority_form_fields.html.erb +++ b/app/views/shared/support_interface/forms/_teaching_authority_form_fields.html.erb @@ -4,5 +4,5 @@ <%= f.govuk_text_area :teaching_authority_emails_string, label: { text: "Email:" }, hint: { text: "One email per line (if more than one)" } %> <%= f.govuk_text_area :teaching_authority_websites_string, label: { text: "Websites:" }, hint: { text: "One website per line (if more than one)" } %> <%= f.govuk_text_field :teaching_authority_certificate, label: { text: "Name given to describe the Letter of Professional standing: " } %> -<%= f.govuk_text_area :teaching_authority_other, label: { text: "Teaching authority other" } %> +<%= f.govuk_text_area :other_information, label: { text: "Teaching authority other" } %> <%= f.govuk_text_field :teaching_authority_online_checker_url, label: { text: "Online checker URL" } %> diff --git a/app/views/support_interface/countries/preview.html.erb b/app/views/support_interface/countries/preview.html.erb index b239e33689..e7401b1269 100644 --- a/app/views/support_interface/countries/preview.html.erb +++ b/app/views/support_interface/countries/preview.html.erb @@ -7,13 +7,7 @@ <% if (diff_actions = @form.diff_actions).present? %><%= @country.teaching_authority_certificate %>
<%= @country.teaching_authority_online_checker_url %>
<% end %> +<% if @country.sanction_information_changed? %> +Contact them directly and instruct them to send the document to <%= govuk_link_to t("service.email.verification"), %(mailto: #{t("service.email.verification")}) %>.
Once you've submitted your application, we’ll notify <%= region_teaching_authority_name(view_object.region) %> that you’ve applied for QTS. You do not need to contact us to get written confirmation of this.
-<% if view_object.region.teaching_authority_other.present? %> -<%= view_object.region.teaching_authority_other %>
-<% elsif view_object.region.country.teaching_authority_other.present? %> -<%= view_object.region.country.teaching_authority_other %>
+ +<% if view_object.region.other_information.present? %> + <%= raw GovukMarkdown.render(view_object.region.other_information) %> <% end %> + +<% if view_object.region.country.other_information.present? %> + <%= raw GovukMarkdown.render(view_object.region.country.other_information) %> +<% end %> +Once you’re satisfied that you understand your next steps, you can close this page.
diff --git a/app/views/teacher_interface/registration_number/edit.html.erb b/app/views/teacher_interface/registration_number/edit.html.erb index c95d45b89a..8000bab574 100644 --- a/app/views/teacher_interface/registration_number/edit.html.erb +++ b/app/views/teacher_interface/registration_number/edit.html.erb @@ -7,22 +7,22 @@ <%= f.govuk_text_field :registration_number, label: { size: "l", tag: "h1" } %> <% if @application_form.region.status_check_online? %> - <% if @application_form.region.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.teaching_authority_status_information) %> + <% if @application_form.region.status_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.status_information) %> <% end %> - <% if @application_form.region.country.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.country.teaching_authority_status_information) %> + <% if @application_form.region.country.status_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.country.status_information) %> <% end %> <% end %> <% if @application_form.region.sanction_check_online? %> - <% if @application_form.region.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.teaching_authority_sanction_information) %> + <% if @application_form.region.sanction_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.sanction_information) %> <% end %> - <% if @application_form.region.country.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.country.teaching_authority_sanction_information) %> + <% if @application_form.region.country.sanction_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.country.sanction_information) %> <% end %> <% end %> @@ -32,5 +32,6 @@ contact you for more information as part of your application. <% end %> + <%= render "shared/save_submit_buttons", f: %> <% end %> diff --git a/app/views/teacher_interface/uploads/new.html.erb b/app/views/teacher_interface/uploads/new.html.erb index a72e64153c..b5d62f0dc8 100644 --- a/app/views/teacher_interface/uploads/new.html.erb +++ b/app/views/teacher_interface/uploads/new.html.erb @@ -91,21 +91,22 @@This written confirmation must be dated within 6 months of you applying for QTS.
<% if @application_form.region.status_check_written? %> - <% if @application_form.region.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.teaching_authority_status_information) %> + <% if @application_form.region.status_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.status_information) %> <% end %> - <% if @application_form.region.country.teaching_authority_status_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.country.teaching_authority_status_information) %> + <% if @application_form.region.country.status_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.country.status_information) %> <% end %> <% end %> <% if @application_form.region.sanction_check_written? %> - <% if @application_form.region.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.teaching_authority_sanction_information) %> + <% if @application_form.region.sanction_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.sanction_information) %> <% end %> - <% if @application_form.region.country.teaching_authority_sanction_information.present?%> - <%= raw GovukMarkdown.render(@application_form.region.country.teaching_authority_sanction_information) %> + + <% if @application_form.region.country.sanction_information.present? %> + <%= raw GovukMarkdown.render(@application_form.region.country.sanction_information) %> <% end %> <% end %> diff --git a/spec/support/system_helpers.rb b/spec/support/system_helpers.rb index e79a372407..96756e91d3 100644 --- a/spec/support/system_helpers.rb +++ b/spec/support/system_helpers.rb @@ -21,9 +21,9 @@ def given_an_eligible_eligibility_check(country_check:) requires_preliminary_check: true, status_check: country_check, sanction_check: country_check, - teaching_authority_status_information: "Status information", - teaching_authority_sanction_information: "Sanction information", - teaching_authority_other: "Other teaching authority information.", + status_information: "Status information", + sanction_information: "Sanction information", + other_information: "Other teaching authority information.", ) visit "/eligibility/start" diff --git a/spec/system/support_interface/countries_spec.rb b/spec/system/support_interface/countries_spec.rb index 061ee2f1e9..3609076982 100644 --- a/spec/system/support_interface/countries_spec.rb +++ b/spec/system/support_interface/countries_spec.rb @@ -23,9 +23,9 @@ when_i_fill_teaching_authority_address when_i_fill_teaching_authority_emails when_i_fill_teaching_authority_websites - when_i_fill_teaching_authority_other - when_i_fill_teaching_authority_sanction_information - when_i_fill_teaching_authority_status_information + when_i_fill_other_information + when_i_fill_sanction_information + when_i_fill_status_information when_i_fill_teaching_authority_certificate when_i_fill_teaching_authority_online_checker_url when_i_fill_qualifications_information @@ -45,9 +45,9 @@ when_i_fill_teaching_authority_address when_i_fill_teaching_authority_emails when_i_fill_teaching_authority_websites - when_i_fill_teaching_authority_other - when_i_fill_teaching_authority_sanction_information - when_i_fill_teaching_authority_status_information + when_i_fill_other_information + when_i_fill_sanction_information + when_i_fill_status_information when_i_fill_teaching_authority_certificate when_i_fill_teaching_authority_online_checker_url when_i_select_yes_teaching_authority_requires_submission_email @@ -183,10 +183,10 @@ def when_i_fill_teaching_authority_websites with: "Website" end - def when_i_fill_teaching_authority_other - fill_in "region-teaching-authority-other-field", with: "Other" + def when_i_fill_other_information + fill_in "region-other-information-field", with: "Other" rescue Capybara::ElementNotFound - fill_in "support-interface-country-form-teaching-authority-other-field", + fill_in "support-interface-country-form-other-information-field", with: "Other" end @@ -205,19 +205,17 @@ def when_i_fill_teaching_authority_online_checker_url with: "https://www.example.com/checks" end - def when_i_fill_teaching_authority_sanction_information - fill_in "region-teaching-authority-sanction-information-field", - with: "Sanction information" + def when_i_fill_sanction_information + fill_in "region-sanction-information-field", with: "Sanction information" rescue Capybara::ElementNotFound - fill_in "support-interface-country-form-teaching-authority-sanction-information-field", + fill_in "support-interface-country-form-sanction-information-field", with: "Sanction information" end - def when_i_fill_teaching_authority_status_information - fill_in "region-teaching-authority-status-information-field", - with: "Status information" + def when_i_fill_status_information + fill_in "region-status-information-field", with: "Status information" rescue Capybara::ElementNotFound - fill_in "support-interface-country-form-teaching-authority-status-information-field", + fill_in "support-interface-country-form-status-information-field", with: "Status information" end diff --git a/spec/views/shared/eligible_region_content_spec.rb b/spec/views/shared/eligible_region_content_spec.rb index 220aa0ba0f..f82afa5d7d 100644 --- a/spec/views/shared/eligible_region_content_spec.rb +++ b/spec/views/shared/eligible_region_content_spec.rb @@ -32,8 +32,8 @@ ), status_check: :written, sanction_check: :written, - teaching_authority_status_information: "Status information", - teaching_authority_sanction_information: "Sanction information", + status_information: "Status information", + sanction_information: "Sanction information", teaching_authority_address: "address", qualifications_information: "qualifications info", )