Update labels in Posting defaults settings (#36084)
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
- content_for :heading_actions do
|
||||
= button_tag t('generic.save_changes'), class: 'button', form: 'edit_preferences'
|
||||
|
||||
- if ['unlisted', 'private'].include?(current_user.setting_default_privacy)
|
||||
- initial_quote_hint = I18n.t("simple_form.hints.defaults.setting_default_quote_policy_#{current_user.setting_default_privacy}")
|
||||
|
||||
= simple_form_for current_user, url: settings_preferences_posting_defaults_path, html: { id: :edit_preferences } do |f|
|
||||
= render 'shared/error_messages', object: current_user
|
||||
|
||||
@@ -16,7 +19,7 @@
|
||||
selected: current_user.setting_default_privacy,
|
||||
hint: false,
|
||||
include_blank: false,
|
||||
label_method: ->(visibility) { safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') },
|
||||
label_method: ->(visibility) { visibility == 'private' ? I18n.t('statuses.visibilities.private') : safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') },
|
||||
label: I18n.t('simple_form.labels.defaults.setting_default_privacy'),
|
||||
required: false,
|
||||
wrapper: :with_label
|
||||
@@ -27,9 +30,10 @@
|
||||
include_blank: false,
|
||||
label_method: ->(policy) { I18n.t("statuses.quote_policies.#{policy}") },
|
||||
label: I18n.t('simple_form.labels.defaults.setting_default_quote_policy'),
|
||||
hint: I18n.t('simple_form.hints.defaults.setting_default_quote_policy'),
|
||||
hint: initial_quote_hint,
|
||||
required: false,
|
||||
wrapper: :with_label
|
||||
wrapper: :with_label,
|
||||
wrapper_html: { data: { 'unlisted-hint': I18n.t('simple_form.hints.defaults.setting_default_quote_policy_unlisted'), 'private-hint': I18n.t('simple_form.hints.defaults.setting_default_quote_policy_private') } }
|
||||
|
||||
.fields-group
|
||||
= ff.input :default_language,
|
||||
|
||||
Reference in New Issue
Block a user