mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-25 16:04:22 -05:00
FIX: enum site settings UI was broken
This commit is contained in:
parent
651def63e5
commit
e114e47533
1 changed files with 8 additions and 7 deletions
|
@ -120,14 +120,15 @@ module SiteSettingExtension
|
||||||
.map do |s, v|
|
.map do |s, v|
|
||||||
value = send(s)
|
value = send(s)
|
||||||
type = types[get_data_type(s, value)]
|
type = types[get_data_type(s, value)]
|
||||||
opts = {setting: s,
|
opts = {
|
||||||
description: description(s),
|
setting: s,
|
||||||
default: v,
|
description: description(s),
|
||||||
type: type.to_s,
|
default: v,
|
||||||
value: value.to_s,
|
type: type.to_s,
|
||||||
category: categories[s]
|
value: value.to_s,
|
||||||
|
category: categories[s]
|
||||||
}
|
}
|
||||||
opts.merge({valid_values: enum_class(s).values, translate_names: enum_class(s).translate_names?}) if type == :enum
|
opts.merge!({valid_values: enum_class(s).values, translate_names: enum_class(s).translate_names?}) if type == :enum
|
||||||
opts[:choices] = choices[s] if choices.has_key? s
|
opts[:choices] = choices[s] if choices.has_key? s
|
||||||
opts
|
opts
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue