From 23d007215e97a5842a1c42c5f5ac77c3e3a74f08 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Mon, 25 Jul 2022 10:43:16 +0100 Subject: [PATCH] Use new formbuilder config option to disable bold radio labels (#779) --- Gemfile.lock | 8 ++++---- app/views/schemes/details.html.erb | 3 +-- app/views/schemes/new.html.erb | 3 +-- app/views/schemes/support.html.erb | 6 ++---- config/initializers/govuk_design_system_formbuilder.rb | 3 +++ 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 config/initializers/govuk_design_system_formbuilder.rb diff --git a/Gemfile.lock b/Gemfile.lock index 8da6b2c8d..4bcfa6266 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -175,7 +175,7 @@ GEM pagy (~> 5.10.1) railties (>= 6.1) view_component (~> 2.56.2) - govuk_design_system_formbuilder (3.1.0) + govuk_design_system_formbuilder (3.1.1) actionview (>= 6.1) activemodel (>= 6.1) activesupport (>= 6.1) @@ -225,11 +225,11 @@ GEM net-protocol timeout nio4r (2.5.8) - nokogiri (1.13.7-arm64-darwin) + nokogiri (1.13.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.7-x86_64-darwin) + nokogiri (1.13.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.7-x86_64-linux) + nokogiri (1.13.8-x86_64-linux) racc (~> 1.4) notifications-ruby-client (5.3.0) jwt (>= 1.5, < 3) diff --git a/app/views/schemes/details.html.erb b/app/views/schemes/details.html.erb index 4c42617f8..0e756bad1 100644 --- a/app/views/schemes/details.html.erb +++ b/app/views/schemes/details.html.erb @@ -49,8 +49,7 @@ :id, :name, :description, - legend: { text: "Is this scheme registered under the Care Standards Act 2000?", size: "m" }, - bold_labels: false %> + legend: { text: "Is this scheme registered under the Care Standards Act 2000?", size: "m" } %> <% organisations = Organisation.all.map { |org| OpenStruct.new(id: org.id, name: org.name) } %> diff --git a/app/views/schemes/new.html.erb b/app/views/schemes/new.html.erb index 4d3e20cd4..a7f52ea1c 100644 --- a/app/views/schemes/new.html.erb +++ b/app/views/schemes/new.html.erb @@ -53,8 +53,7 @@ :id, :name, :description, - legend: { text: "Is this scheme registered under the Care Standards Act 2000?", size: "m" }, - bold_labels: false %> + legend: { text: "Is this scheme registered under the Care Standards Act 2000?", size: "m" } %> <% if current_user.support? %> <%= f.govuk_collection_select :owning_organisation_id, diff --git a/app/views/schemes/support.html.erb b/app/views/schemes/support.html.erb index dd2758cfd..451c11402 100644 --- a/app/views/schemes/support.html.erb +++ b/app/views/schemes/support.html.erb @@ -23,8 +23,7 @@ :id, :name, :description, - legend: { text: "Level of support given", size: "m" }, - bold_labels: false %> + legend: { text: "Level of support given", size: "m" } %> <% intended_length_of_stay_options_hints = { "Very short stay": "Up to one month.", "Short stay": "Up to one year.", "Medium stay": "More than one year but with an expectation to move on.", "Permanent": "Provides a home for life with no requirement for the tenant to move." } %> @@ -35,8 +34,7 @@ :id, :name, :description, - legend: { text: "Intended length of stay", size: "m" }, - bold_labels: false %> + legend: { text: "Intended length of stay", size: "m" } %> <%= f.hidden_field :page, value: "support" %> diff --git a/config/initializers/govuk_design_system_formbuilder.rb b/config/initializers/govuk_design_system_formbuilder.rb new file mode 100644 index 000000000..08e00a72d --- /dev/null +++ b/config/initializers/govuk_design_system_formbuilder.rb @@ -0,0 +1,3 @@ +GOVUKDesignSystemFormBuilder.configure do |conf| + conf.default_collection_radio_buttons_auto_bold_labels = false +end