Change wording of “Content cache retention period” setting to highlight destructive implications (#23261)
parent
acc419b81b
commit
94329f28e1
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :media_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
= f.input :media_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||||
= f.input :content_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
= f.input :content_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }, hint: false, warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period')
|
||||||
= f.input :backups_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
= f.input :backups_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
|
|
|
@ -19,8 +19,17 @@ module RecommendedComponent
|
||||||
end
|
end
|
||||||
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(AppendComponent)
|
||||||
SimpleForm.include_component(RecommendedComponent)
|
SimpleForm.include_component(RecommendedComponent)
|
||||||
|
SimpleForm.include_component(WarningHintComponent)
|
||||||
|
|
||||||
SimpleForm.setup do |config|
|
SimpleForm.setup do |config|
|
||||||
# Wrappers are used by the form builder to generate a
|
# Wrappers are used by the form builder to generate a
|
||||||
|
@ -101,6 +110,7 @@ SimpleForm.setup do |config|
|
||||||
b.use :html5
|
b.use :html5
|
||||||
b.use :label
|
b.use :label
|
||||||
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
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 :input, wrap_with: { tag: :div, class: :label_input }
|
||||||
b.use :error, wrap_with: { tag: :span, class: :error }
|
b.use :error, wrap_with: { tag: :span, class: :error }
|
||||||
end
|
end
|
||||||
|
|
|
@ -78,7 +78,7 @@ en:
|
||||||
backups_retention_period: Keep generated user archives for the specified number of days.
|
backups_retention_period: Keep generated user archives for the specified number of days.
|
||||||
bootstrap_timeline_accounts: These accounts will be pinned to the top of new users' follow recommendations.
|
bootstrap_timeline_accounts: These accounts will be pinned to the top of new users' follow recommendations.
|
||||||
closed_registrations_message: Displayed when sign-ups are closed
|
closed_registrations_message: Displayed when sign-ups are closed
|
||||||
content_cache_retention_period: Posts from other servers will be deleted after the specified number of days when set to a positive value. This may be irreversible.
|
content_cache_retention_period: All posts and boosts from other servers will be deleted after the specified number of days. Some posts may not be recoverable. All related bookmarks, favourites and boosts will also be lost and impossible to undo.
|
||||||
custom_css: You can apply custom styles on the web version of Mastodon.
|
custom_css: You can apply custom styles on the web version of Mastodon.
|
||||||
mascot: Overrides the illustration in the advanced web interface.
|
mascot: Overrides the illustration in the advanced web interface.
|
||||||
media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand.
|
media_cache_retention_period: Downloaded media files will be deleted after the specified number of days when set to a positive value, and re-downloaded on demand.
|
||||||
|
|
Reference in New Issue