mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Wizard - Color Scheme Step
This commit is contained in:
parent
9f12b571ef
commit
3f6e3b9aff
21 changed files with 343 additions and 23 deletions
|
@ -52,7 +52,17 @@ class WizardFieldSerializer < ApplicationSerializer
|
|||
|
||||
def options
|
||||
object.options.map do |o|
|
||||
{id: o, label: I18n.t("#{i18n_key}.options.#{o}")}
|
||||
|
||||
result = {id: o, label: I18n.t("#{i18n_key}.options.#{o}")}
|
||||
|
||||
data = object.option_data[o]
|
||||
if data.present?
|
||||
as_json = data.dup
|
||||
as_json.delete(:id)
|
||||
result[:data] = as_json
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue