diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index fbd0e8ece..d57f9b215 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -88,7 +88,7 @@ class OrganisationsController < ApplicationController private def org_params - params.require(:organisation).permit(:name, :address_line1, :address_line2, :postcode, :phone, :holds_own_stock, :provider_type) + params.require(:organisation).permit(:name, :address_line1, :address_line2, :postcode, :phone, :holds_own_stock, :provider_type, :housing_registration_no) end def search_term diff --git a/app/views/organisations/new.html.erb b/app/views/organisations/new.html.erb index ae4653cf4..39d372528 100644 --- a/app/views/organisations/new.html.erb +++ b/app/views/organisations/new.html.erb @@ -38,6 +38,10 @@ autocomplete: "tel", width: 20 %> + <%= f.govuk_text_field :housing_registration_no, + label: { text: "Regulator of Social Housing registration number", size: "m" }, + width: 10 %> + <% null_option = [OpenStruct.new(id: "", name: "Select an option")] %> <% types = Organisation::PROVIDER_TYPE.map { |key, _val| OpenStruct.new(id: key, name: Organisation::DISPLAY_PROVIDER_TYPE[key]) } %> <% type_answer_options = null_option + types %> diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 271eed620..a875dbb9b 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -282,6 +282,7 @@ RSpec.describe OrganisationsController, type: :request do phone: "011101101", provider_type: "LA", holds_own_stock: "true", + housing_registration_no: "7917937" }, } end @@ -853,6 +854,7 @@ RSpec.describe OrganisationsController, type: :request do phone: "011101101", provider_type: "LA", holds_own_stock: "true", + housing_registration_no: "7917937" }, } end