From ed955a5bf17bccb5ef1734225d9b8306b657d4fb Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Tue, 6 Sep 2022 09:02:30 +0100 Subject: [PATCH] feat: make autocomplete accesible and la readable --- app/controllers/locations_controller.rb | 2 +- app/views/locations/la_fallback.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index d6968c4ef..0406b9d47 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -103,7 +103,7 @@ private end def location_params - required_params = params.require(:location).permit(:postcode, :name, :units, :type_of_unit, :add_another_location, :startdate, :mobility_type).merge(scheme_id: @scheme.id) + required_params = params.require(:location).permit(:postcode, :name, :units, :type_of_unit, :add_another_location, :startdate, :mobility_type, :location_admin_district).merge(scheme_id: @scheme.id) required_params[:postcode] = PostcodeService.clean(required_params[:postcode]) if required_params[:postcode] required_params end diff --git a/app/views/locations/la_fallback.html.erb b/app/views/locations/la_fallback.html.erb index 4030cc761..39b5804cc 100644 --- a/app/views/locations/la_fallback.html.erb +++ b/app/views/locations/la_fallback.html.erb @@ -336,10 +336,10 @@ <%= f.govuk_collection_select :location_admin_district, las, - :id, + :name, :name, label: { hidden: true }, - "data-controller": %w[accessible-autocomplete conditional-filter] %> + "data-controller": %w[conditional-filter accessible-autocomplete] %> <%= f.hidden_field :page, value: "la-fallback" %>