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? %>

Regions

-
- - - Warning - This action is irreversible and could affect historic eligibility checks. - -
+ <%= govuk_warning_text(text: "This action is irreversible and could affect historic eligibility checks.") %>