Change wording of “Content cache retention period” setting to highlight destructive implications (#23261)

This commit is contained in:
Claire
2023-06-02 18:09:08 +02:00
committed by GitHub
parent acc419b81b
commit 94329f28e1
3 changed files with 12 additions and 2 deletions

View File

@ -19,8 +19,17 @@ module RecommendedComponent
end
end
module WarningHintComponent
def warning_hint(_wrapper_options = nil)
@warning_hint ||= begin
options[:warning_hint].to_s.html_safe if options[:warning_hint].present?
end
end
end
SimpleForm.include_component(AppendComponent)
SimpleForm.include_component(RecommendedComponent)
SimpleForm.include_component(WarningHintComponent)
SimpleForm.setup do |config|
# Wrappers are used by the form builder to generate a
@ -101,6 +110,7 @@ SimpleForm.setup do |config|
b.use :html5
b.use :label
b.use :hint, wrap_with: { tag: :span, class: :hint }
b.use :warning_hint, wrap_with: { tag: :span, class: [:hint, 'warning-hint'] }
b.use :input, wrap_with: { tag: :div, class: :label_input }
b.use :error, wrap_with: { tag: :span, class: :error }
end