diff --git a/app/models/farming_grant_option.rb b/app/models/farming_grant_option.rb index d9370585f..6d07e9d49 100644 --- a/app/models/farming_grant_option.rb +++ b/app/models/farming_grant_option.rb @@ -1,14 +1,10 @@ class FarmingGrantOption < Document - validates :open_or_closed, presence: true - validates :funding_types, presence: true validates :grant_schemes, presence: true validates :payment_types, presence: true FORMAT_SPECIFIC_FIELDS = %i[ - open_or_closed areas_of_interest land_types - funding_types grant_schemes payment_types ].freeze diff --git a/app/views/metadata_fields/_farming_grant_options.html.erb b/app/views/metadata_fields/_farming_grant_options.html.erb index 5374bcfa9..6e6b76140 100644 --- a/app/views/metadata_fields/_farming_grant_options.html.erb +++ b/app/views/metadata_fields/_farming_grant_options.html.erb @@ -1,31 +1,3 @@ -<%= render layout: "shared/form_group", locals: { f: f, field: :open_or_closed } do %> - <%= f.select :open_or_closed, - f.object.facet_options(:open_or_closed), - {}, - { - class: 'select2 form-control', - multiple: true, - data: { - placeholder: 'Select open or closed' - } - } - %> -<% end %> - -<%= render layout: "shared/form_group", locals: { f: f, field: :areas_of_interest } do %> - <%= f.select :areas_of_interest, - f.object.facet_options(:areas_of_interest), - {}, - { - class: 'select2 form-control', - multiple: true, - data: { - placeholder: 'Select areas of interest' - } - } - %> -<% end %> - <%= render layout: "shared/form_group", locals: { f: f, field: :land_types } do %> <%= f.select :land_types, f.object.facet_options(:land_types), @@ -40,15 +12,15 @@ %> <% end %> -<%= render layout: "shared/form_group", locals: { f: f, field: :funding_types } do %> - <%= f.select :funding_types, - f.object.facet_options(:funding_types), +<%= render layout: "shared/form_group", locals: { f: f, field: :areas_of_interest } do %> + <%= f.select :areas_of_interest, + f.object.facet_options(:areas_of_interest), {}, { class: 'select2 form-control', multiple: true, data: { - placeholder: 'Select funding types' + placeholder: 'Select areas of interest' } } %> diff --git a/lib/documents/schemas/farming_grant_options.json b/lib/documents/schemas/farming_grant_options.json index 08537aa50..7ed98a2f7 100644 --- a/lib/documents/schemas/farming_grant_options.json +++ b/lib/documents/schemas/farming_grant_options.json @@ -10,34 +10,16 @@ }, "organisations": [ "de4e9dc6-cca4-43af-a594-682023b84d6c", - "e8fae147-6232-4163-a3f1-1c15b755a8a4", - "8bf5624b-dec2-44fa-9b6c-daed166333a5" + "e8fae147-6232-4163-a3f1-1c15b755a8a4" ], "show_summaries": true, "signup_content_id": "2cd12e92-3b68-4cb1-bafe-fde6a7939afb", "signup_copy": "You'll get an email each time a grant is updated or a new grant is published.", "subscription_list_title_prefix": "Farming grant options", - "summary": "

Find out about grant options, items and actions in the Farming and Countryside Programme. This is for land or farms in England.

This tool does not confirm your eligibility.

For information on grant schemes and funding see Funding for farmers, growers and land managers.

", + "summary": "

Find out about grant options, items and actions in the Farming and Countryside Programme. This is for land or farms in England. We will add more grants when they open.

This tool does not confirm your eligibility. To get a grant for an option, item or action, you must meet the criteria of the grant scheme it belongs to.

You can search by keyword or the name of a grant. Use the filters to narrow your search.

", "document_noun": "grant", "facets": [ - { - "key": "open_or_closed", - "name": "Open or closed", - "type": "text", - "preposition": "which are", - "display_as_result_metadata": true, - "filterable": true, - "allowed_values": [ - { - "label": "Open", - "value": "open"}, - { - "label": "Closed", - "value": "closed" - } - ] - }, { "key": "areas_of_interest", "name": "Areas of interest", @@ -166,28 +148,6 @@ } ] }, - { - "key": "funding_types", - "name": "Funding types", - "type": "text", - "preposition": "is", - "display_as_result_metadata": true, - "filterable": true, - "allowed_values": [ - { - "label": "Option", - "value": "option" - }, - { - "label": "Item", - "value": "item" - }, - { - "label": "Action", - "value": "action" - } - ] - }, { "key": "grant_schemes", "name": "Grant schemes", diff --git a/spec/fixtures/factories.rb b/spec/fixtures/factories.rb index 7b6e051e0..1182a0691 100644 --- a/spec/fixtures/factories.rb +++ b/spec/fixtures/factories.rb @@ -771,10 +771,8 @@ transient do default_metadata do { - "open_or_closed" => %w[open], "areas_of_interest" => %w[air-quality], "land_types" => %w[arable-land], - "funding_types" => %w[option], "grant_schemes" => %w[countryside-stewardship], "payment_types" => %w[capital], } diff --git a/spec/models/farming_grant_option_spec.rb b/spec/models/farming_grant_option_spec.rb index 06b710056..93afdb86f 100644 --- a/spec/models/farming_grant_option_spec.rb +++ b/spec/models/farming_grant_option_spec.rb @@ -15,16 +15,6 @@ expect(farming_grant_option).to be_valid end - it "is invalid if the open or closed field is missing" do - farming_grant_option.open_or_closed = nil - expect(farming_grant_option).not_to be_valid - end - - it "is invalid if the funding types field is missing" do - farming_grant_option.funding_types = nil - expect(farming_grant_option).not_to be_valid - end - it "is invalid if the grant schemes field is missing" do farming_grant_option.grant_schemes = nil expect(farming_grant_option).not_to be_valid