mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -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|
|
||||
value = send(s)
|
||||
type = types[get_data_type(s, value)]
|
||||
opts = {setting: s,
|
||||
description: description(s),
|
||||
default: v,
|
||||
type: type.to_s,
|
||||
value: value.to_s,
|
||||
category: categories[s]
|
||||
opts = {
|
||||
setting: s,
|
||||
description: description(s),
|
||||
default: v,
|
||||
type: type.to_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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue