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']
|
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]
|
params[key.to_sym] = field_template[key] if field_template[key]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -187,6 +187,16 @@ class CustomWizard::Builder
|
||||||
)
|
)
|
||||||
end
|
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)
|
field = step.add_field(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren