From b3c49f9425a5f53700fccfb3350ae676d96e1352 Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Fri, 8 Sep 2023 11:20:34 +0100 Subject: [PATCH] Hide additional fields for countries with one region At the moment with countryies with on region there are two places you can put this information, which is confusing. Instead we should hide it to encourage users to use the region. --- app/views/support_interface/countries/edit.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/support_interface/countries/edit.html.erb b/app/views/support_interface/countries/edit.html.erb index 6f928ac126..c52066ca3d 100644 --- a/app/views/support_interface/countries/edit.html.erb +++ b/app/views/support_interface/countries/edit.html.erb @@ -30,7 +30,9 @@ <%= f.govuk_radio_button :has_regions, :false, label: { text: "No" } %> <% end %> - <%= render "shared/support_interface/country_region_information_fields", f: %> + <% if @country.regions.count > 1 %> + <%= render "shared/support_interface/country_region_information_fields", f: %> + <% end %> <%= f.govuk_submit "Preview", name: "preview", value: "true" do %> <%= f.govuk_submit "Save", name: "preview", value: "false", secondary: true %>