From 7f63e72a50a77ab80af01b2fa56f458a5faadb74 Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Wed, 16 Nov 2022 14:53:45 -0700 Subject: [PATCH] UX: Mark pre-populated dropdowns as not required (#19064) These two dropdown fields in the setup wizard are pre-populated, and there is no way to de-select a value, you can only change it. So we can remove the required attribute so that an asterisk doesn't show up in the UI. --- lib/wizard/builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index b96b5e786e..48ccba0d1c 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -19,7 +19,7 @@ class Wizard languages = step.add_field(id: 'default_locale', type: 'dropdown', - required: true, + required: false, value: SiteSetting.default_locale) LocaleSiteSetting.values.each do |locale| @@ -129,7 +129,7 @@ class Wizard end current = SiteSetting.top_menu.starts_with?("categories") ? SiteSetting.desktop_category_page_style : "latest" - style = step.add_field(id: 'homepage_style', type: 'dropdown', required: true, value: current, show_in_sidebar: true) + style = step.add_field(id: 'homepage_style', type: 'dropdown', required: false, value: current, show_in_sidebar: true) style.add_choice('latest') CategoryPageStyle.values.each do |page| style.add_choice(page[:value])