foodsoft/app/views/shared/_custom_form_fields.html.haml

8 lines
419 B
Text
Raw Permalink Normal View History

- if FoodsoftConfig[:custom_fields] && FoodsoftConfig[:custom_fields][type]
= f.simple_fields_for :custom_fields, defaults: { required: false } do |s|
- FoodsoftConfig[:custom_fields][type].each do |options|
- options = options.deep_symbolize_keys
- name = options.delete(:name)
- value = f.object.settings.custom_fields[name]
= s.input name, options.deep_merge(input_html: {value:value})