diff --git a/app/components/select_component.html.erb b/app/components/select_component.html.erb index f41be8a4d..3f81b2886 100644 --- a/app/components/select_component.html.erb +++ b/app/components/select_component.html.erb @@ -2,6 +2,9 @@ <% unless @skip_label %> <%= @form.label @attribute %> <% end %> + <% if @label_hint %> + <%= @label_hint %> + <% end %> <%= @form.select @attribute, @choices, @options, @html_options %> <%= render partial: "error", locals: { model: @form.object, attribute: @attribute } %> diff --git a/app/components/select_component.rb b/app/components/select_component.rb index 73f88d346..688ff2ba0 100644 --- a/app/components/select_component.rb +++ b/app/components/select_component.rb @@ -6,6 +6,7 @@ def initialize(config, **kwargs) @options = config.fetch(:options, {}) @html_options = config.fetch(:html_options, {}) @skip_label = config.fetch(:skip_label, true) + @label_hint = config.fetch(:label_hint, "") super(**kwargs) end diff --git a/app/views/spaces/_sections.html.erb b/app/views/spaces/_sections.html.erb index 9ee532ffe..303dbb969 100644 --- a/app/views/spaces/_sections.html.erb +++ b/app/views/spaces/_sections.html.erb @@ -13,7 +13,7 @@ <%- end %> <% end %> -