Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
enabled interpolation and templating
Dieser Commit ist enthalten in:
Ursprung
21ac87cdda
Commit
d47950733d
1 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
|
@ -86,7 +86,7 @@ class CustomWizard::Builder
|
|||
required: field_template['required']
|
||||
}
|
||||
|
||||
%w(label description image key validations min_length max_length char_counter placeholder).each do |key|
|
||||
%w(label description image key validations min_length max_length char_counter).each do |key|
|
||||
params[key.to_sym] = field_template[key] if field_template[key]
|
||||
end
|
||||
|
||||
|
@ -187,6 +187,16 @@ class CustomWizard::Builder
|
|||
)
|
||||
end
|
||||
|
||||
if field_template['placeholder'].present?
|
||||
params[:placeholder] = mapper.interpolate(
|
||||
field_template['placeholder'],
|
||||
user: true,
|
||||
value: true,
|
||||
wizard: true,
|
||||
template: true
|
||||
)
|
||||
end
|
||||
|
||||
field = step.add_field(params)
|
||||
end
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren